/*
 * This file was automatically generated by EvoSuite
 * Sun Mar 03 02:27:18 GMT 2024
 */

package com.ib.client;

import org.junit.Test;
import static org.junit.Assert.*;
import static org.evosuite.runtime.EvoAssertions.*;
import com.ib.client.EClientErrors;
import com.ib.client.EException;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;

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

  @Test(timeout = 4000)
  public void test0()  throws Throwable  {
      EException eException0 = new EException(0, 3, "");
      int int0 = eException0.getId();
      assertEquals(0, int0);
  }

  @Test(timeout = 4000)
  public void test1()  throws Throwable  {
      EException eException0 = new EException("]t^8,w@*)` y# M9I^X");
      int int0 = eException0.getId();
      assertEquals((-1), int0);
  }

  @Test(timeout = 4000)
  public void test2()  throws Throwable  {
      EException eException0 = new EException("}JTY]O?*'fHqo");
      int int0 = eException0.getErrorCode();
      assertEquals((-1), int0);
  }

  @Test(timeout = 4000)
  public void test3()  throws Throwable  {
      EException eException0 = null;
      try {
        eException0 = new EException(0, (EClientErrors.CodeMsgPair) null);
        fail("Expecting exception: NullPointerException");
      
      } catch(NullPointerException e) {
         //
         // no message in exception (getMessage() returned null)
         //
         verifyException("com.ib.client.EException", e);
      }
  }

  @Test(timeout = 4000)
  public void test4()  throws Throwable  {
      EException eException0 = new EException((-180), 0, "com.ib.client.EClientErrors");
      int int0 = eException0.getErrorCode();
      assertEquals(0, int0);
  }

  @Test(timeout = 4000)
  public void test5()  throws Throwable  {
      EClientErrors.CodeMsgPair eClientErrors_CodeMsgPair0 = new EClientErrors.CodeMsgPair(2504, "%{m&OACGb");
      EException eException0 = new EException(2504, eClientErrors_CodeMsgPair0);
      String string0 = eException0.getMessage();
      assertEquals("%{m&OACGb [id = 2504, errorCode = 2504]", string0);
  }

  @Test(timeout = 4000)
  public void test6()  throws Throwable  {
      EClientErrors.CodeMsgPair eClientErrors_CodeMsgPair0 = new EClientErrors.CodeMsgPair(2504, "%{m&OACGb");
      EException eException0 = new EException(2504, eClientErrors_CodeMsgPair0);
      int int0 = eException0.getErrorCode();
      assertEquals(2504, int0);
  }

  @Test(timeout = 4000)
  public void test7()  throws Throwable  {
      EClientErrors.CodeMsgPair eClientErrors_CodeMsgPair0 = new EClientErrors.CodeMsgPair(2504, "%{m&OACGb");
      EException eException0 = new EException(2504, eClientErrors_CodeMsgPair0);
      int int0 = eException0.getId();
      assertEquals(2504, int0);
  }
}
