content: /*
   * This file was automatically generated by UTestGen and EvoSuite
   * Wed Mar 20 19:52:56 GMT 2024
   */
  
  package simulator.CA;
  
  import org.junit.jupiter.api.Test;
  import static org.junit.jupiter.api.Assertions.*;
  import org.junit.jupiter.api.Timeout;
  import java.util.concurrent.TimeUnit;
  import static org.evosuite.runtime.EvoAssertions.*;
  import jade.content.OntoACLMessage;
  import jade.lang.acl.ACLMessage;
  import org.evosuite.runtime.EvoRunner;
  import org.evosuite.runtime.EvoRunnerParameters;
  import org.junit.runner.RunWith;
  import simulator.CA.ConsumerAgent;
  
  @RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true) 
  public class ConsumerAgent_ESTest extends ConsumerAgent_ESTest_scaffolding {
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testSetupThrowsNullPointerException() throws Throwable  {
        ConsumerAgent consumerAgent = new ConsumerAgent();
        try {
        consumerAgent.setup();
        fail("Expecting exception: NullPointerException");
        } catch(NullPointerException e) {
        // Verify that the exception is an instance of the expected type and has no message
        assertEquals(NullPointerException.class, e.getClass());
        assertNull(e.getMessage());}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testOnFailure() throws Throwable  {
        // rollbacked to evosuite
        ConsumerAgent consumerAgent = new ConsumerAgent();
        OntoACLMessage arg0 = new OntoACLMessage();
        consumerAgent.onFailure(arg0);
        assertEquals(10, ACLMessage.NOT_UNDERSTOOD);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreateQueryMsgForNeighbourhoodThrowsNullPointerException() throws Throwable  {
        // Test for null pointer exception when no message is given
        ConsumerAgent consumerAgent = new ConsumerAgent();
        try {
        consumerAgent.createQueryMsgForNeighbourhood();
        fail("Expecting exception: NullPointerException");
        } catch(NullPointerException e) {
        // Verify that the exception is an instance of the expected type
        assertTrue(e instanceof NullPointerException);
        // Verify that the message in the exception is null
        assertEquals(null, e.getMessage());}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testConsumeWaterThrowsNullPointerException() throws Throwable  {
        ConsumerAgent consumerAgent = new ConsumerAgent();
        
        // Given a new instance of ConsumerAgent
        
        try {
        // When calling consumeWater()
        consumerAgent.consumeWater();
        
        fail("Expecting exception: NullPointerException");
        
        } catch(NullPointerException e) {
        // Then an exception is thrown with a null message
        verifyException("jade.content.ContentManager", e);}
    }
  }
  