/*
 * This file was automatically generated by EvoSuite
 * Thu Sep 20 13:17:04 GMT 2018
 */

package uk.ac.sanger.artemis.components.database;

import org.junit.Test;
import static org.junit.Assert.*;
import static org.evosuite.shaded.org.mockito.Mockito.*;
import static org.evosuite.runtime.EvoAssertions.*;
import java.awt.HeadlessException;
import javax.swing.tree.TreeNode;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.evosuite.runtime.ViolatedAssumptionAnswer;
import org.junit.runner.RunWith;
import uk.ac.sanger.artemis.components.database.DatabaseJTree;
import uk.ac.sanger.artemis.components.database.DatabaseTreeNode;

@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
public class DatabaseJTree_ESTest extends DatabaseJTree_ESTest_scaffolding {

  @Test(timeout = 4000)
  public void test0()  throws Throwable  {
      DatabaseTreeNode databaseTreeNode0 = mock(DatabaseTreeNode.class, new ViolatedAssumptionAnswer());
      doReturn((TreeNode) null).when(databaseTreeNode0).getChildAt(anyInt());
      doReturn(2000).when(databaseTreeNode0).getChildCount();
      doReturn(";F>.", ";F>.").when(databaseTreeNode0).toString();
      doReturn(false, false, false, false).when(databaseTreeNode0).isLeaf();
      DatabaseJTree databaseJTree0 = null;
      try {
        databaseJTree0 = new DatabaseJTree(databaseTreeNode0);
        fail("Expecting exception: NullPointerException");
      
      } catch(NullPointerException e) {
         //
         // Null child not allowed
         //
         verifyException("javax.swing.tree.TreePath", e);
      }
  }

  @Test(timeout = 4000)
  public void test1()  throws Throwable  {
      DatabaseJTree databaseJTree0 = null;
      try {
        databaseJTree0 = new DatabaseJTree((DatabaseTreeNode) null);
        fail("Expecting exception: HeadlessException");
      
      } catch(HeadlessException e) {
         //
         // no message in exception (getMessage() returned null)
         //
         verifyException("java.awt.dnd.DragSource", e);
      }
  }
}
