content: /*
   * This file was automatically generated by UTestGen and EvoSuite
   * Thu Mar 21 04:46:24 GMT 2024
   */
  
  package de.paragon.explorer.model;
  
  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 de.paragon.explorer.model.ArrayAttributeModel;
  import de.paragon.explorer.model.AttributeModel;
  import de.paragon.explorer.model.AttributeModelComparator;
  import de.paragon.explorer.model.StandardAttributeModel;
  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 AttributeModelComparator_ESTest extends AttributeModelComparator_ESTest_scaffolding {
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCompareReturningPositive0() throws Throwable  {
        // Test the comparison of two attributes with different values
        AttributeModelComparator attributeModelComparator = new AttributeModelComparator();
        
        // Create two attribute models, one with a name "<tr>" and another with an empty name ""
        StandardAttributeModel arg0 = new StandardAttributeModel();
        arg0.setName("<tr>");
        StandardAttributeModel arg1 = new StandardAttributeModel();
        arg1.setName("");
        
        // Compare the two attributes using the comparator
        int compare = attributeModelComparator.compare((AttributeModel) arg0, (AttributeModel) arg1);
        
        // Assert that the comparison returns a value of 4, which means that the first attribute is considered "greater" than the second one
        assertEquals(4, compare);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCompareReturningPositive1() throws Throwable  {
        // No Comments were added
        StandardAttributeModel arg1 = new StandardAttributeModel();
        arg1.setName("abstractfigure.trying2get_parts_of_a_basic_figure");
        StandardAttributeModel arg0 = new StandardAttributeModel();
        arg0.setName("u_.x,Nu|f");
        AttributeModelComparator attributeModelComparator = new AttributeModelComparator();
        int compare = attributeModelComparator.compare((AttributeModel) arg0, (AttributeModel) arg1);
        assertEquals(20, compare);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCompareReturningNegative0() throws Throwable  {
        // No Comments were added
        AttributeModelComparator attributeModelComparator = new AttributeModelComparator();
        StandardAttributeModel arg0 = new StandardAttributeModel();
        StandardAttributeModel arg1 = new StandardAttributeModel();
        arg0.setName("GWeN?tq?;RN[Cd.&1");
        arg1.setName("");
        int compare = attributeModelComparator.compare((AttributeModel) arg0, (AttributeModel) arg1);
        assertEquals((-1), compare);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCompareReturningNegative1() throws Throwable  {
        // Given
        StandardAttributeModel arg1 = new StandardAttributeModel();
        arg1.setName("<tNr>");
        
        StandardAttributeModel arg0 = new StandardAttributeModel();
        arg0.setName("");
        
        AttributeModelComparator attributeModelComparator = new AttributeModelComparator();
        
        // When
        int compare = attributeModelComparator.compare(arg0, arg1);
        
        // Then
        assertEquals((-5), compare);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCompareReturningNegative2() throws Throwable  {
        // No Comments were added
        StandardAttributeModel arg0 = new StandardAttributeModel();
        arg0.setName("abstractfigure.trying2get_parts_of_a_basic_figure");
        StandardAttributeModel arg1 = new StandardAttributeModel();
        arg1.setName("u_.x,Nu|f");
        AttributeModelComparator attributeModelComparator = new AttributeModelComparator();
        int compare = attributeModelComparator.compare((AttributeModel) arg0, (AttributeModel) arg1);
        assertEquals((-20), compare);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCompareReturningPositive2() throws Throwable  {
        // rollbacked to evosuite
        AttributeModelComparator attributeModelComparator = new AttributeModelComparator();
        StandardAttributeModel arg1 = new StandardAttributeModel();
        StandardAttributeModel arg0 = new StandardAttributeModel();
        arg1.setName("GWeN?tq?;RN[Cd.&1");
        arg0.setName("");
        int compare = attributeModelComparator.compare((AttributeModel) arg0, (AttributeModel) arg1);
        assertEquals(1, compare);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCompareReturningZero() throws Throwable  {
        // Set up the attribute models to be compared
        AttributeModelComparator attributeModelComparator = new AttributeModelComparator();
        StandardAttributeModel arg1 = new StandardAttributeModel();
        arg1.setName("GWeN?tq?;RN[Cd.&1");
        StandardAttributeModel arg2 = new StandardAttributeModel();
        arg2.setName("GWeN?tq?;RN[Cd.&1");
        
        // Perform the comparison
        int compare = attributeModelComparator.compare(arg1, arg2);
        
        // Assert that the comparison returns 0, indicating that the attributes are equal
        assertEquals(0, compare);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCompareWithNullAndAttributeModelWhereIsObjectModelIsFalse() throws Throwable  {
        // Given an instance of AttributeModelComparator
        AttributeModelComparator attributeModelComparator = new AttributeModelComparator();
        
        // And a non-null ArrayAttributeModel arg0
        ArrayAttributeModel arg0 = new ArrayAttributeModel();
        
        // When we compare arg0 to null using the compare method of AttributeModelComparator
        int compare = attributeModelComparator.compare((AttributeModel) arg0, (AttributeModel) null);
        
        // Then we expect the result to be -1
        assertEquals(-1, compare);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCompareWithNullAndNull() throws Throwable  {
        // Arrange
        AttributeModelComparator attributeModelComparator = new AttributeModelComparator();
        
        // Act
        int compare = attributeModelComparator.compare(null, null);
        
        // Assert
        assertEquals(-1, compare);
    }
  }
  