/*
 * This file was automatically generated by EvoSuite
 * Thu Sep 20 14:31:29 GMT 2018
 */

package org.gmod.schema.pub;

import org.junit.Test;
import static org.junit.Assert.*;
import static org.evosuite.shaded.org.mockito.Mockito.*;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.evosuite.runtime.ViolatedAssumptionAnswer;
import org.gmod.schema.general.DbXRef;
import org.gmod.schema.pub.Pub;
import org.gmod.schema.pub.PubDbXRef;
import org.junit.runner.RunWith;

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

  @Test(timeout = 4000)
  public void test0()  throws Throwable  {
      PubDbXRef pubDbXRef0 = new PubDbXRef((Pub) null, (DbXRef) null, false);
      boolean boolean0 = pubDbXRef0.isCurrent();
      assertFalse(boolean0);
  }

  @Test(timeout = 4000)
  public void test1()  throws Throwable  {
      DbXRef dbXRef0 = mock(DbXRef.class, new ViolatedAssumptionAnswer());
      PubDbXRef pubDbXRef0 = new PubDbXRef((Pub) null, dbXRef0, true);
      pubDbXRef0.getPub();
      assertTrue(pubDbXRef0.isCurrent());
  }

  @Test(timeout = 4000)
  public void test2()  throws Throwable  {
      DbXRef dbXRef0 = mock(DbXRef.class, new ViolatedAssumptionAnswer());
      PubDbXRef pubDbXRef0 = new PubDbXRef((Pub) null, dbXRef0, true);
      boolean boolean0 = pubDbXRef0.isCurrent();
      assertTrue(boolean0);
  }

  @Test(timeout = 4000)
  public void test3()  throws Throwable  {
      DbXRef dbXRef0 = mock(DbXRef.class, new ViolatedAssumptionAnswer());
      PubDbXRef pubDbXRef0 = new PubDbXRef((Pub) null, dbXRef0, true);
      pubDbXRef0.setPub((Pub) null);
      assertTrue(pubDbXRef0.isCurrent());
  }

  @Test(timeout = 4000)
  public void test4()  throws Throwable  {
      DbXRef dbXRef0 = mock(DbXRef.class, new ViolatedAssumptionAnswer());
      PubDbXRef pubDbXRef0 = new PubDbXRef((Pub) null, dbXRef0, true);
      pubDbXRef0.setCurrent(true);
      assertTrue(pubDbXRef0.isCurrent());
  }

  @Test(timeout = 4000)
  public void test5()  throws Throwable  {
      DbXRef dbXRef0 = mock(DbXRef.class, new ViolatedAssumptionAnswer());
      doReturn((String) null).when(dbXRef0).toString();
      PubDbXRef pubDbXRef0 = new PubDbXRef((Pub) null, dbXRef0, true);
      pubDbXRef0.getDbXRef();
      assertTrue(pubDbXRef0.isCurrent());
  }

  @Test(timeout = 4000)
  public void test6()  throws Throwable  {
      PubDbXRef pubDbXRef0 = new PubDbXRef();
      DbXRef dbXRef0 = pubDbXRef0.getDbXRef();
      assertNull(dbXRef0);
  }

  @Test(timeout = 4000)
  public void test7()  throws Throwable  {
      DbXRef dbXRef0 = mock(DbXRef.class, new ViolatedAssumptionAnswer());
      PubDbXRef pubDbXRef0 = new PubDbXRef((Pub) null, dbXRef0, true);
      DbXRef dbXRef1 = mock(DbXRef.class, new ViolatedAssumptionAnswer());
      pubDbXRef0.setDbXRef(dbXRef1);
      assertTrue(pubDbXRef0.isCurrent());
  }
}
