/*
 * This file was automatically generated by EvoSuite
 * Wed Sep 19 21:58:33 GMT 2018
 */

package uk.ac.sanger.artemis.circular;

import org.junit.Test;
import static org.junit.Assert.*;
import static org.evosuite.runtime.EvoAssertions.*;
import java.awt.AWTKeyStroke;
import java.awt.MultipleGradientPaint;
import java.util.Stack;
import java.util.Vector;
import javax.swing.JTextArea;
import javax.swing.KeyStroke;
import javax.swing.table.DefaultTableModel;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
import uk.ac.sanger.artemis.circular.MemoryComboBox;

@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = false, useJEE = true) 
public class MemoryComboBox_ESTest extends MemoryComboBox_ESTest_scaffolding {

  @Test(timeout = 4000)
  public void test00()  throws Throwable  {
      Vector<DefaultTableModel> vector0 = new Vector<DefaultTableModel>();
      MemoryComboBox memoryComboBox0 = new MemoryComboBox(vector0);
      // Undeclared exception!
      try { 
        memoryComboBox0.getURLAt(1443);
        fail("Expecting exception: ArrayIndexOutOfBoundsException");
      
      } catch(ArrayIndexOutOfBoundsException e) {
         //
         // Array index out of range: 1443
         //
         verifyException("java.util.Vector", e);
      }
  }

  @Test(timeout = 4000)
  public void test01()  throws Throwable  {
      Vector<DefaultTableModel> vector0 = new Vector<DefaultTableModel>();
      DefaultTableModel defaultTableModel0 = new DefaultTableModel(1443, 1443);
      vector0.add(defaultTableModel0);
      vector0.add(defaultTableModel0);
      MemoryComboBox memoryComboBox0 = new MemoryComboBox(vector0);
      memoryComboBox0.isItem(vector0);
  }

  @Test(timeout = 4000)
  public void test02()  throws Throwable  {
      Vector<MultipleGradientPaint.CycleMethod> vector0 = new Vector<MultipleGradientPaint.CycleMethod>();
      MemoryComboBox memoryComboBox0 = new MemoryComboBox(vector0);
      memoryComboBox0.addURL((Object) null);
      memoryComboBox0.getURLAt(0);
  }

  @Test(timeout = 4000)
  public void test03()  throws Throwable  {
      Vector<DefaultTableModel> vector0 = new Vector<DefaultTableModel>();
      DefaultTableModel defaultTableModel0 = new DefaultTableModel(1443, 1443);
      vector0.add(defaultTableModel0);
      MemoryComboBox memoryComboBox0 = new MemoryComboBox(vector0);
      memoryComboBox0.getIndexOf(defaultTableModel0);
  }

  @Test(timeout = 4000)
  public void test04()  throws Throwable  {
      Vector<DefaultTableModel> vector0 = new Vector<DefaultTableModel>();
      DefaultTableModel defaultTableModel0 = new DefaultTableModel(1443, 1443);
      vector0.add(defaultTableModel0);
      DefaultTableModel defaultTableModel1 = new DefaultTableModel(58, 8907);
      vector0.add(defaultTableModel1);
      MemoryComboBox memoryComboBox0 = new MemoryComboBox(vector0);
      memoryComboBox0.getIndexOf(defaultTableModel1);
  }

  @Test(timeout = 4000)
  public void test05()  throws Throwable  {
      Vector<MultipleGradientPaint.CycleMethod> vector0 = new Vector<MultipleGradientPaint.CycleMethod>();
      MemoryComboBox memoryComboBox0 = new MemoryComboBox(vector0);
      memoryComboBox0.addURL((Object) null);
      // Undeclared exception!
      try { 
        memoryComboBox0.isItem((Object) null);
        fail("Expecting exception: NullPointerException");
      
      } catch(NullPointerException e) {
         //
         // no message in exception (getMessage() returned null)
         //
         verifyException("uk.ac.sanger.artemis.circular.MemoryComboBox", e);
      }
  }

  @Test(timeout = 4000)
  public void test06()  throws Throwable  {
      Vector<KeyStroke> vector0 = new Vector<KeyStroke>(0);
      Character character0 = Character.valueOf('!');
      KeyStroke keyStroke0 = KeyStroke.getKeyStroke(character0, 0);
      vector0.insertElementAt(keyStroke0, 0);
      MemoryComboBox memoryComboBox0 = new MemoryComboBox(vector0);
      // Undeclared exception!
      try { 
        memoryComboBox0.getURLAt(0);
        fail("Expecting exception: ClassCastException");
      
      } catch(ClassCastException e) {
         //
         // javax.swing.KeyStroke cannot be cast to java.net.URL
         //
         verifyException("uk.ac.sanger.artemis.circular.MemoryComboBox", e);
      }
  }

  @Test(timeout = 4000)
  public void test07()  throws Throwable  {
      MemoryComboBox memoryComboBox0 = null;
      try {
        memoryComboBox0 = new MemoryComboBox((Vector) null);
        fail("Expecting exception: NullPointerException");
      
      } catch(NullPointerException e) {
         //
         // no message in exception (getMessage() returned null)
         //
         verifyException("javax.swing.DefaultComboBoxModel", e);
      }
  }

  @Test(timeout = 4000)
  public void test08()  throws Throwable  {
      Vector<DefaultTableModel> vector0 = new Vector<DefaultTableModel>();
      DefaultTableModel defaultTableModel0 = new DefaultTableModel(vector0, 0);
      Object[] objectArray0 = new Object[5];
      objectArray0[4] = (Object) defaultTableModel0;
      vector0.add(defaultTableModel0);
      MemoryComboBox memoryComboBox0 = new MemoryComboBox(vector0);
      boolean boolean0 = memoryComboBox0.isItem(objectArray0[4]);
      assertTrue(boolean0);
  }

  @Test(timeout = 4000)
  public void test09()  throws Throwable  {
      Vector<DefaultTableModel> vector0 = new Vector<DefaultTableModel>();
      DefaultTableModel defaultTableModel0 = new DefaultTableModel(1443, 1443);
      vector0.add(defaultTableModel0);
      vector0.add(defaultTableModel0);
      MemoryComboBox memoryComboBox0 = new MemoryComboBox(vector0);
      boolean boolean0 = memoryComboBox0.isForwardPage();
      assertTrue(boolean0);
  }

  @Test(timeout = 4000)
  public void test10()  throws Throwable  {
      Vector<DefaultTableModel> vector0 = new Vector<DefaultTableModel>();
      MemoryComboBox memoryComboBox0 = new MemoryComboBox(vector0);
      boolean boolean0 = memoryComboBox0.isForwardPage();
      assertFalse(boolean0);
  }

  @Test(timeout = 4000)
  public void test11()  throws Throwable  {
      Vector<DefaultTableModel> vector0 = new Vector<DefaultTableModel>();
      DefaultTableModel defaultTableModel0 = new DefaultTableModel(vector0, 0);
      vector0.add(defaultTableModel0);
      MemoryComboBox memoryComboBox0 = new MemoryComboBox(vector0);
      MultipleGradientPaint.CycleMethod multipleGradientPaint_CycleMethod0 = MultipleGradientPaint.CycleMethod.REFLECT;
      memoryComboBox0.addURL(multipleGradientPaint_CycleMethod0);
      boolean boolean0 = memoryComboBox0.isBackPage();
      assertTrue(vector0.contains(defaultTableModel0));
      assertTrue(boolean0);
  }

  @Test(timeout = 4000)
  public void test12()  throws Throwable  {
      Vector<DefaultTableModel> vector0 = new Vector<DefaultTableModel>();
      DefaultTableModel defaultTableModel0 = new DefaultTableModel(1443, 1443);
      vector0.add(defaultTableModel0);
      vector0.add(defaultTableModel0);
      MemoryComboBox memoryComboBox0 = new MemoryComboBox(vector0);
      boolean boolean0 = memoryComboBox0.isBackPage();
      assertFalse(boolean0);
  }

  @Test(timeout = 4000)
  public void test13()  throws Throwable  {
      Vector<DefaultTableModel> vector0 = new Vector<DefaultTableModel>();
      MemoryComboBox memoryComboBox0 = new MemoryComboBox(vector0);
      boolean boolean0 = memoryComboBox0.isBackPage();
      assertFalse(boolean0);
  }

  @Test(timeout = 4000)
  public void test14()  throws Throwable  {
      Stack<MultipleGradientPaint.CycleMethod> stack0 = new Stack<MultipleGradientPaint.CycleMethod>();
      MemoryComboBox memoryComboBox0 = new MemoryComboBox(stack0);
      memoryComboBox0.addURL((Object) null);
      memoryComboBox0.setLastIndex((Object) null);
      assertEquals(1, stack0.size());
      assertEquals("[null]", stack0.toString());
  }

  @Test(timeout = 4000)
  public void test15()  throws Throwable  {
      Vector<DefaultTableModel> vector0 = new Vector<DefaultTableModel>();
      MemoryComboBox memoryComboBox0 = new MemoryComboBox(vector0);
      memoryComboBox0.setLastIndex((Object) null);
      assertEquals(30, MemoryComboBox.MAX_MEM_LEN);
  }

  @Test(timeout = 4000)
  public void test16()  throws Throwable  {
      Vector<AWTKeyStroke> vector0 = new Vector<AWTKeyStroke>();
      MemoryComboBox memoryComboBox0 = new MemoryComboBox(vector0);
      DefaultTableModel defaultTableModel0 = new DefaultTableModel(8, 26);
      vector0.setSize(30);
      memoryComboBox0.addURL(defaultTableModel0);
      assertEquals(30, vector0.size());
  }

  @Test(timeout = 4000)
  public void test17()  throws Throwable  {
      Stack<JTextArea> stack0 = new Stack<JTextArea>();
      MemoryComboBox memoryComboBox0 = new MemoryComboBox(stack0);
      int int0 = memoryComboBox0.getIndexOf((Object) null);
      assertEquals((-1), int0);
  }
}
