content: /*
   * This file was automatically generated by UTestGen and EvoSuite
   * Thu Mar 21 07:48:18 GMT 2024
   */
  
  package wheel.util;
  
  import org.junit.jupiter.api.Test;
  import static org.junit.jupiter.api.Assertions.*;
  import org.junit.jupiter.api.Timeout;
  import java.util.concurrent.TimeUnit;
  import static org.evosuite.runtime.EvoAssertions.*;
  import java.util.Collection;
  import org.evosuite.runtime.EvoRunner;
  import org.evosuite.runtime.EvoRunnerParameters;
  import org.junit.runner.RunWith;
  import org.mvel.util.FastList;
  import wheel.ErrorPage;
  import wheel.components.Component;
  import wheel.components.ElExpression;
  import wheel.components.StandaloneComponent;
  import wheel.util.DynamicSelectModel;
  
  @RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true) 
  public class DynamicSelectModel_Original_ESTest extends DynamicSelectModel_Original_ESTest_scaffolding {
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetOptionCountReturningPositive() throws Throwable  {
        DynamicSelectModel dynamicSelectModel = new DynamicSelectModel();
        dynamicSelectModel.enumeration("wheel.components.Form$Method");
        int optionCount = dynamicSelectModel.getOptionCount();
        assertEquals(2, optionCount);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetLabel() throws Throwable  {
        DynamicSelectModel dynamicSelectModel = new DynamicSelectModel();
        Object arg0 = new Object();
        dynamicSelectModel.empty(arg0);
        dynamicSelectModel.enumeration("[] from ");
        String label = dynamicSelectModel.getLabel(0);
        assertNotNull(label);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testValidateThrowsRuntimeException() throws Throwable  {
        DynamicSelectModel dynamicSelectModel = new DynamicSelectModel();
        // Undeclared exception!
        try { 
          dynamicSelectModel.validate();
          fail("Expecting exception: RuntimeException");
        
        } catch(RuntimeException e) {
           //
           // Could not create DynamicSelection model. Collection attribute was null or not an el-expression.
           //
           verifyException("wheel.util.DynamicSelectModel", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testEmpty() throws Throwable  {
        DynamicSelectModel dynamicSelectModel = new DynamicSelectModel();
        dynamicSelectModel.collection("[] from ");
        Object arg0 = new Object();
        DynamicSelectModel empty = dynamicSelectModel.empty(arg0);
        Collection objects = empty.getObjects();
        assertNotNull(objects);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCollectionReturningNonNull() throws Throwable  {
        DynamicSelectModel dynamicSelectModel = new DynamicSelectModel();
        DynamicSelectModel collection = dynamicSelectModel.collection("[] from ");
        Collection objects = collection.getObjects();
        assertNotNull(objects);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetOptionCountReturningZero() throws Throwable  {
        DynamicSelectModel dynamicSelectModel = new DynamicSelectModel();
        dynamicSelectModel.enumeration("[] from ");
        dynamicSelectModel.getOptionCount();
        Collection objects = dynamicSelectModel.getObjects();
        assertNotNull(objects);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testLabel() throws Throwable  {
        DynamicSelectModel dynamicSelectModel = new DynamicSelectModel();
        dynamicSelectModel.collection((String) null);
        dynamicSelectModel.label((String) null);
        // Undeclared exception!
        try { 
          dynamicSelectModel.validate();
          fail("Expecting exception: RuntimeException");
        
        } catch(RuntimeException e) {
           //
           // Could not create DynamicSelection model. Value attribute was null or not an el-expression.
           //
           verifyException("wheel.util.DynamicSelectModel", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCollectionWithNull() throws Throwable  {
        DynamicSelectModel dynamicSelectModel = new DynamicSelectModel();
        dynamicSelectModel.collection((String) null);
        // Undeclared exception!
        try { 
          dynamicSelectModel.validate();
          fail("Expecting exception: RuntimeException");
        
        } catch(RuntimeException e) {
           //
           // Could not create DynamicSelection model. Label attribute was null or not an el-expression.
           //
           verifyException("wheel.util.DynamicSelectModel", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testValidate() throws Throwable  {
        DynamicSelectModel dynamicSelectModel = new DynamicSelectModel();
        DynamicSelectModel enumeration = dynamicSelectModel.enumeration("[] frvom ");
        enumeration.validate();
        assertSame(dynamicSelectModel, enumeration);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCollectionWithEmptyString() throws Throwable  {
        DynamicSelectModel dynamicSelectModel = new DynamicSelectModel();
        DynamicSelectModel collection = dynamicSelectModel.collection("");
        // Undeclared exception!
        try { 
          collection.getObjects();
          fail("Expecting exception: RuntimeException");
        
        } catch(RuntimeException e) {
           //
           // Expression  evaluated to null. Can't build a dynamic ISelectModel
           //
           verifyException("wheel.util.DynamicSelectModel", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testTranslateValueAndValue() throws Throwable  {
        DynamicSelectModel dynamicSelectModel = new DynamicSelectModel();
        DynamicSelectModel collection = dynamicSelectModel.collection("[] frvom ");
        Object arg0 = new Object();
        dynamicSelectModel.empty(arg0);
        dynamicSelectModel.enumeration("[] frvom ");
        collection.value("[] frvom ");
        Object translateValue = dynamicSelectModel.translateValue("org.mvel.util.FastList@0000000030");
        assertSame(translateValue, arg0);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testTranslateValueReturningNull() throws Throwable  {
        DynamicSelectModel dynamicSelectModel = new DynamicSelectModel();
        Object arg0 = new Object();
        dynamicSelectModel.empty(arg0);
        dynamicSelectModel.enumeration("[] frvom ");
        dynamicSelectModel.value("[] frvom ");
        Object translateValue = dynamicSelectModel.translateValue("org.mvel.util.FastList@0000000030");
        assertNull(translateValue);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testSetTopLevelComponent() throws Throwable  {
        DynamicSelectModel dynamicSelectModel = new DynamicSelectModel();
        ErrorPage arg0 = new ErrorPage();
        dynamicSelectModel.setTopLevelComponent(arg0);
        StandaloneComponent topLevelComponent = dynamicSelectModel.getTopLevelComponent();
        assertSame(topLevelComponent, arg0);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testTranslator() throws Throwable  {
        DynamicSelectModel dynamicSelectModel = new DynamicSelectModel();
        DynamicSelectModel translator = dynamicSelectModel.translator("[] frvom ");
        Object arg0 = new Object();
        dynamicSelectModel.empty(arg0);
        dynamicSelectModel.enumeration("[] frvom ");
        translator.value("[] frvom ");
        FastList translateValue = (FastList)dynamicSelectModel.translateValue("org.mvel.util.FastList@0000000030");
        assertEquals(0, translateValue.size());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFailsToCreateDynamicSelectModelTaking3ArgumentsThrowsRuntimeException() throws Throwable  {
        DynamicSelectModel dynamicSelectModel = null;
        try {
          dynamicSelectModel = new DynamicSelectModel((ElExpression) null, (ElExpression) null, (ElExpression) null);
          fail("Expecting exception: RuntimeException");
        
        } catch(RuntimeException e) {
           //
           // Could not create DynamicSelection model. Collection attribute was null or not an el-expression.
           //
           verifyException("wheel.util.DynamicSelectModel", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetTopLevelComponentReturningNull() throws Throwable  {
        DynamicSelectModel dynamicSelectModel = new DynamicSelectModel();
        StandaloneComponent topLevelComponent = dynamicSelectModel.getTopLevelComponent();
        assertNull(topLevelComponent);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testSetComponent() throws Throwable  {
        DynamicSelectModel dynamicSelectModel = new DynamicSelectModel();
        ErrorPage arg0 = new ErrorPage();
        dynamicSelectModel.setComponent(arg0);
        ErrorPage component = (ErrorPage)dynamicSelectModel.getComponent();
        assertFalse(component._isBuilt());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testReset() throws Throwable  {
        DynamicSelectModel dynamicSelectModel = new DynamicSelectModel();
        dynamicSelectModel.reset();
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetComponentReturningNull() throws Throwable  {
        DynamicSelectModel dynamicSelectModel = new DynamicSelectModel();
        Component component = dynamicSelectModel.getComponent();
        assertNull(component);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testEnumeration() throws Throwable  {
        DynamicSelectModel dynamicSelectModel = new DynamicSelectModel();
        dynamicSelectModel.enumeration("wheel.components.Form$Method");
        Collection objects = dynamicSelectModel.getObjects();
        assertNotNull(objects);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetObjectsThrowsRuntimeException() throws Throwable  {
        DynamicSelectModel dynamicSelectModel = new DynamicSelectModel();
        DynamicSelectModel collection = dynamicSelectModel.collection("wheel.components.Form$Method");
        // Undeclared exception!
        try { 
          collection.getObjects();
          fail("Expecting exception: RuntimeException");
        
        } catch(RuntimeException e) {
           //
           // Expression wheel.components.Form$Method evaluated to an object that is not an instance of Collection or Object[]. Can't build a dynamic ISelectModel
           //
           verifyException("wheel.util.DynamicSelectModel", e);
        }
    }
  }
  