<filename>generated-tests/rmosa/tests/s1002/69_lhamacaw/evosuite-tests/macaw/businessLayer/SupportingDocument_ESTest.java
/*
 * This file was automatically generated by EvoSuite
 * Thu Aug 23 05:43:51 GMT 2018
 */

package macaw.businessLayer;

import org.junit.Test;
import static org.junit.Assert.*;
import static org.evosuite.runtime.EvoAssertions.*;
import java.util.ArrayList;
import macaw.businessLayer.SupportingDocument;
import macaw.businessLayer.User;
import macaw.system.MacawChangeEvent;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.evosuite.runtime.System;
import org.junit.runner.RunWith;

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

  /**
  //Test case number: 0
  /*Coverage entropy=1.6094379124341005
  */
  @Test(timeout = 4000)
  public void test00()  throws Throwable  {
      SupportingDocument supportingDocument0 = new SupportingDocument();
      try { 
        SupportingDocument.validateFields(supportingDocument0);
        fail("Expecting exception: Exception");
      
      } catch(Exception e) {
         //
         // no message in exception (getMessage() returned null)
         //
         verifyException("macaw.businessLayer.SupportingDocument", e);
      }
  }

  /**
  //Test case number: 1
  /*Coverage entropy=1.7917594692280547
  */
  @Test(timeout = 4000)
  public void test01()  throws Throwable  {
      SupportingDocument supportingDocument0 = new SupportingDocument();
      supportingDocument0.getTitle();
      supportingDocument0.setFilePath("");
      supportingDocument0.setTitle("");
      boolean boolean0 = supportingDocument0.isNewRecord();
      assertFalse(boolean0);
      
      supportingDocument0.getDescription();
      assertEquals(0, supportingDocument0.getIdentifier());
  }

  /**
  //Test case number: 2
  /*Coverage entropy=2.0794415416798357
  */
  @Test(timeout = 4000)
  public void test02()  throws Throwable  {
      SupportingDocument supportingDocument0 = new SupportingDocument();
      String string0 = "dKvdjpmG$wNEPXb=|";
      supportingDocument0.clone();
      supportingDocument0.setFilePath("dKvdjpmG$wNEPXb=|");
      User user0 = new User();
      supportingDocument0.clone();
      user0.setPassword("");
      try { 
        User.validateFields(user0);
        fail("Expecting exception: Exception");
      
      } catch(Exception e) {
         //
         // no message in exception (getMessage() returned null)
         //
         verifyException("macaw.businessLayer.User", e);
      }
  }

  /**
  //Test case number: 3
  /*Coverage entropy=1.7917594692280547
  */
  @Test(timeout = 4000)
  public void test03()  throws Throwable  {
      SupportingDocument supportingDocument0 = new SupportingDocument();
      String string0 = supportingDocument0.getDisplayName();
      assertEquals("-", string0);
      
      supportingDocument0.setDescription("-");
      supportingDocument0.setFileName("-");
      supportingDocument0.setFileName("`qw3~4&?ApN");
      supportingDocument0.setIdentifier(0);
      boolean boolean0 = supportingDocument0.isNewRecord();
      assertFalse(boolean0);
      
      supportingDocument0.setFileName("`qw3~4&?ApN");
      assertEquals("0", supportingDocument0.getDisplayItemIdentifier());
  }

  /**
  //Test case number: 4
  /*Coverage entropy=1.945910149055313
  */
  @Test(timeout = 4000)
  public void test04()  throws Throwable  {
      SupportingDocument supportingDocument0 = new SupportingDocument();
      supportingDocument0.setFileName("");
      int int0 = supportingDocument0.getIdentifier();
      assertEquals(0, int0);
      
      supportingDocument0.setFilePath("1AkEjy:@Nr'~");
      supportingDocument0.getFileName();
      supportingDocument0.setFileName("1AkEjy:@Nr'~");
      supportingDocument0.getFileName();
      supportingDocument0.getDocumentCode();
      SupportingDocument supportingDocument1 = new SupportingDocument();
      String string0 = supportingDocument1.getDisplayItemIdentifier();
      assertEquals("0", string0);
      
      supportingDocument1.setFilePath("1AkEjy:@Nr'~");
      assertFalse(supportingDocument1.isNewRecord());
  }

  /**
  //Test case number: 5
  /*Coverage entropy=1.7917594692280547
  */
  @Test(timeout = 4000)
  public void test05()  throws Throwable  {
      User user0 = new User((String) null, (String) null);
      SupportingDocument supportingDocument0 = new SupportingDocument();
      user0.setPhone("^g");
      user0.setCounty("B`d/&7EmQ4:h]^5{N4");
      supportingDocument0.setDocumentCode("+2\"l(]}0h-?WfzgA4yp");
      try { 
        SupportingDocument.validateFields(supportingDocument0);
        fail("Expecting exception: Exception");
      
      } catch(Exception e) {
         //
         // no message in exception (getMessage() returned null)
         //
         verifyException("macaw.businessLayer.SupportingDocument", e);
      }
  }

  /**
  //Test case number: 6
  /*Coverage entropy=1.7917594692280547
  */
  @Test(timeout = 4000)
  public void test06()  throws Throwable  {
      SupportingDocument supportingDocument0 = new SupportingDocument();
      supportingDocument0.setFileName("supportingDocument.documentCode.label");
      try { 
        SupportingDocument.validateFields(supportingDocument0);
        fail("Expecting exception: Exception");
      
      } catch(Exception e) {
         //
         // no message in exception (getMessage() returned null)
         //
         verifyException("macaw.businessLayer.SupportingDocument", e);
      }
  }

  /**
  //Test case number: 7
  /*Coverage entropy=2.4849066497880012
  */
  @Test(timeout = 4000)
  public void test07()  throws Throwable  {
      SupportingDocument supportingDocument0 = new SupportingDocument();
      supportingDocument0.getDisplayName();
      supportingDocument0.setDocumentCode("~}b{?; _a.++-KLz@X");
      SupportingDocument supportingDocument1 = new SupportingDocument();
      supportingDocument1.setDocumentCode("UNABLE_TO_GET_CATEGORY");
      supportingDocument1.setFileName("~}b{?; _a.++-KLz@X");
      supportingDocument1.getIdentifier();
      supportingDocument0.getDisplayName();
      SupportingDocument supportingDocument2 = new SupportingDocument();
      supportingDocument2.setDocumentCode("~}b{?; _a.++-KLz@X");
      supportingDocument2.getDescription();
      User user0 = new User("-~}b{?; _a.++-KLz@X", "UNABLE_TO_FILTER_ONTOLOGY_TERMS");
      SupportingDocument.detectFieldChanges(user0, supportingDocument0, supportingDocument1);
      try { 
        SupportingDocument.validateFields(supportingDocument1);
        fail("Expecting exception: Exception");
      
      } catch(Exception e) {
         //
         // no message in exception (getMessage() returned null)
         //
         verifyException("macaw.businessLayer.SupportingDocument", e);
      }
  }

  /**
  //Test case number: 8
  /*Coverage entropy=2.6390573296152584
  */
  @Test(timeout = 4000)
  public void test08()  throws Throwable  {
      SupportingDocument supportingDocument0 = new SupportingDocument();
      supportingDocument0.setTitle("UNABLE_TO_GET_CATEGORY");
      boolean boolean0 = false;
      supportingDocument0.setIsNewRecord(false);
      supportingDocument0.setDescription("UNABLE_TO_GET_CATEGORY");
      supportingDocument0.setDocumentCode("UNABLE_TO_GET_CATEGORY");
      supportingDocument0.getDisplayName();
      User user0 = new User();
      SupportingDocument supportingDocument1 = new SupportingDocument();
      SupportingDocument.detectFieldChanges(user0, supportingDocument0, supportingDocument1);
      supportingDocument0.setIsNewRecord(false);
      String string0 = "-";
      supportingDocument1.setTitle("-");
      supportingDocument1.setTitle("-");
      try { 
        SupportingDocument.validateFields(supportingDocument0);
        fail("Expecting exception: Exception");
      
      } catch(Exception e) {
         //
         // no message in exception (getMessage() returned null)
         //
         verifyException("macaw.businessLayer.SupportingDocument", e);
      }
  }

  /**
  //Test case number: 9
  /*Coverage entropy=2.3978952727983707
  */
  @Test(timeout = 4000)
  public void test09()  throws Throwable  {
      SupportingDocument supportingDocument0 = new SupportingDocument();
      supportingDocument0.setFileName("UNABLE_TO_GET_CATEGORY");
      supportingDocument0.getDescription();
      User user0 = new User();
      User user1 = new User();
      SupportingDocument supportingDocument1 = new SupportingDocument();
      SupportingDocument.detectFieldChanges(user1, supportingDocument0, supportingDocument1);
      supportingDocument0.setIdentifier(10);
      supportingDocument0.getDisplayItemIdentifier();
      assertEquals(10, supportingDocument0.getIdentifier());
      
      supportingDocument1.setFileName("@");
      supportingDocument1.getDescription();
      supportingDocument1.getTitle();
      assertEquals("0", supportingDocument1.getDisplayItemIdentifier());
  }

  /**
  //Test case number: 10
  /*Coverage entropy=2.3025850929940455
  */
  @Test(timeout = 4000)
  public void test10()  throws Throwable  {
      SupportingDocument supportingDocument0 = new SupportingDocument();
      supportingDocument0.setDescription("supportingDocument.title.label");
      supportingDocument0.getDocumentCode();
      User user0 = new User();
      SupportingDocument supportingDocument1 = new SupportingDocument();
      ArrayList<MacawChangeEvent> arrayList0 = SupportingDocument.detectFieldChanges(user0, supportingDocument0, supportingDocument1);
      assertEquals(1, arrayList0.size());
      
      supportingDocument1.getDisplayName();
      String string0 = supportingDocument1.getDisplayName();
      assertEquals(0, supportingDocument1.getIdentifier());
      assertFalse(supportingDocument1.isNewRecord());
      assertEquals("-", string0);
  }

  /**
  //Test case number: 11
  /*Coverage entropy=2.5649493574615376
  */
  @Test(timeout = 4000)
  public void test11()  throws Throwable  {
      SupportingDocument supportingDocument0 = new SupportingDocument();
      supportingDocument0.getDisplayName();
      supportingDocument0.setDocumentCode("-");
      SupportingDocument supportingDocument1 = new SupportingDocument();
      supportingDocument0.setFileName("UNABLE_TO_GET_CATEGORY");
      int int0 = supportingDocument1.getIdentifier();
      assertEquals(0, int0);
      
      supportingDocument1.getDisplayName();
      supportingDocument1.setFileName("-~}b{?; _a.++-KLz@X");
      supportingDocument1.getFileName();
      String string0 = supportingDocument0.getDisplayName();
      assertEquals("--", string0);
      
      boolean boolean0 = supportingDocument0.isNewRecord();
      assertFalse(boolean0);
      
      supportingDocument1.setFilePath("7O`xfcPV>t:9iq");
      User user0 = new User("UNABLE_TO_CHECK_ONTOLOGY_TERM_ASSOCIATION_DUPLICATE", "-");
      user0.setAffiliation(")!Ts;U<&=#");
      ArrayList<MacawChangeEvent> arrayList0 = SupportingDocument.detectFieldChanges(user0, supportingDocument1, supportingDocument0);
      assertEquals(3, arrayList0.size());
  }

  /**
  //Test case number: 12
  /*Coverage entropy=2.5649493574615376
  */
  @Test(timeout = 4000)
  public void test12()  throws Throwable  {
      SupportingDocument supportingDocument0 = new SupportingDocument();
      SupportingDocument supportingDocument1 = new SupportingDocument();
      String string0 = supportingDocument1.getDisplayName();
      assertEquals("-", string0);
      
      supportingDocument1.setDocumentCode((String) null);
      SupportingDocument supportingDocument2 = new SupportingDocument();
      supportingDocument1.setDocumentCode((String) null);
      supportingDocument1.setFileName("%");
      int int0 = supportingDocument2.getIdentifier();
      assertEquals(0, int0);
      
      supportingDocument2.setTitle((String) null);
      supportingDocument1.setDocumentCode("%");
      supportingDocument1.setTitle("UNABLE_TO_GET_CATEGORY");
      SupportingDocument.validateFields(supportingDocument1);
      supportingDocument2.setFileName("%");
      User user0 = new User();
      user0.setAddressLine2("t6)2!9r");
      ArrayList<MacawChangeEvent> arrayList0 = SupportingDocument.detectFieldChanges(user0, supportingDocument1, supportingDocument1);
      assertTrue(arrayList0.isEmpty());
      
      supportingDocument1.getFileName();
      supportingDocument2.setFileName("UNABLE_TO_UPDATE_VALUE_LABELS");
      assertFalse(supportingDocument2.isNewRecord());
  }
}
