content: /*
   * This file was automatically generated by UTestGen and EvoSuite
   * Thu Mar 21 04:17:44 GMT 2024
   */
  
  package mygrid.web;
  
  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 javax.xml.namespace.QName;
  import mygrid.web.Job;
  import mygrid.web._Fail;
  import org.apache.axis.description.TypeDesc;
  import org.apache.axis.encoding.Deserializer;
  import org.apache.axis.encoding.Serializer;
  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) 
  public class _Fail_ESTest extends _Fail_ESTest_scaffolding {
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetJobReturningJobWhereIsBroadcastedIsTrue() throws Throwable  {
        // Given a Fail object that has been set to broadcast a job
        _Fail __Fail = new _Fail();
        Job arg0 = new Job();
        arg0.setBroadcasted(true);
        __Fail.setJob(arg0);
        
        // When the Fail object's getJob() method is called
        Job job = __Fail.getJob();
        
        // Then the job should be broadcasted
        assertTrue(job.isBroadcasted());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetJob() throws Throwable  {
        // Create a new Fail instance and set the Job object
        _Fail fail = new _Fail();
        Job job = new Job();
        fail.setJob(job);
        
        // Get the Job object from the Fail instance
        Job getJob = fail.getJob();
        
        // Assert that the Job objects are the same
        assertSame(job, getJob);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetJobReturningJobWhereGetProgressIsPositive() throws Throwable  {
        // Given a Fail object with a Job object set as its job
        _Fail fail = new _Fail();
        Job job = new Job();
        fail.setJob(job);
        
        // When the progress of the Job is set to 1
        job.setProgress(1);
        
        // Then the id of the Job object should be null
        assertNull(job.getId());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetJobReturningJobWhereGetProgressIsNegative() throws Throwable  {
        // rollbacked to evosuite
        _Fail __Fail = new _Fail();
        Job arg0 = new Job();
        __Fail.setJob(arg0);
        arg0.setProgress((-1));
        Job job = __Fail.getJob();
        assertFalse(job.isBroadcasted());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetJobReturningNull() throws Throwable  {
        // rollbacked to evosuite
        _Fail __Fail = new _Fail();
        Job job = __Fail.getJob();
        assertNull(job);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testSetJob() throws Throwable  {
        // Given: A Fail object with a job assigned
        _Fail fail = new _Fail();
        Job job = new Job();
        fail.setJob(job);
        
        // When: The hash code is calculated for the Fail object
        int result = fail.hashCode();
        
        // Then: The hash code should be non-zero and unique for each Job instance
        assertNotEquals(0, result);
        assertNotEquals(fail.hashCode(), new _Fail().hashCode());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testEqualsReturningTrue() throws Throwable  {
        // No Comments were added
        _Fail __Fail = new _Fail();
        _Fail arg0 = new _Fail();
        boolean equals = __Fail.equals(arg0);
        assertTrue(equals);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testEqualsWithNonNull() throws Throwable  {
        // Given: two instances of Fail class, arg0 and arg1, are created
        _Fail arg0 = new _Fail();
        _Fail arg1 = new _Fail();
        
        // When: the equals method is called on both instances
        boolean equals0 = arg0.equals(arg0);
        boolean equals1 = arg1.equals(arg1);
        
        // Then: both instances are equal to each other
        assertTrue(equals0);
        assertTrue(equals1);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testHashCode() throws Throwable  {
        // No Comments were added
        _Fail __Fail = new _Fail();
        __Fail.hashCode();
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetDeserializer() throws Throwable  {
        // rollbacked to evosuite
        Class<_Fail> arg1 = _Fail.class;
        QName arg2 = new QName("Pod}", "job");
        Deserializer deserializer = _Fail.getDeserializer("job", arg1, arg2);
        assertEquals("Axis SAX Mechanism", deserializer.getMechanismType());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetSerializer() throws Throwable  {
        // Arrange
        Class<_Fail> failClass = _Fail.class;
        QName qName = new QName("job", "job");
        Serializer serializer = _Fail.getSerializer("job", failClass, qName);
        _Fail fail1 = new _Fail();
        
        // Act
        boolean areEqual = fail1.equals(serializer);
        
        // Assert
        assertFalse(areEqual);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetTypeDesc() throws Throwable  {
        // Given: A TypeDesc object with no attributes
        TypeDesc typeDesc = _Fail.getTypeDesc();
        
        // When: We check if the TypeDesc has any attributes
        boolean hasAttributes = typeDesc.hasAttributes();
        
        // Then: The result should be false, indicating that there are no attributes
        assertFalse(hasAttributes);
    }
  }
  