content: /*
   * This file was automatically generated by UTestGen and EvoSuite
   * Wed Mar 20 04:00:14 GMT 2024
   */
  
  package org.jfree.chart.plot;
  
  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 java.awt.Paint;
  import java.awt.Stroke;
  import org.evosuite.runtime.EvoRunner;
  import org.evosuite.runtime.EvoRunnerParameters;
  import org.jfree.chart.axis.DateAxis;
  import org.jfree.chart.plot.CombinedRangeCategoryPlot;
  import org.jfree.chart.plot.ValueMarker;
  import org.jfree.chart.renderer.xy.XYBoxAndWhiskerRenderer;
  import org.junit.runner.RunWith;
  
  @RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true) 
  public class ValueMarker_ESTest extends ValueMarker_ESTest_scaffolding {
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFailsToCreateValueMarkerTaking6ArgumentsThrowsIllegalArgumentException() throws Throwable  {
        DateAxis arg0 = new DateAxis();
        CombinedRangeCategoryPlot combinedRangeCategoryPlot = new CombinedRangeCategoryPlot(arg0);
        Stroke arg4 = combinedRangeCategoryPlot.getRangeGridlineStroke();
        ValueMarker valueMarker; // Initialize the ValueMarker object to be tested
        try {
        valueMarker = new ValueMarker(0.0, (Paint) null, arg4, arg0.DEFAULT_TICK_LABEL_PAINT, arg4, 1800.7413F);
        } catch(IllegalArgumentException e) {
        // Catch the expected IllegalArgumentException that is thrown when a null 'paint' argument is passed to the ValueMarker constructor
        verifyException("org.jfree.chart.plot.Marker", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetValueReturningNegative() throws Throwable  {
        // Create a new ValueMarker instance with an initial value of 1.0
        ValueMarker valueMarker = new ValueMarker(1.0);
        
        // Assert that the ValueMarker's value is equal to 1.0, with a tolerance of 0.01
        assertEquals(1.0, valueMarker.getValue(), 0.01);
        
        // Set the ValueMarker's value to -1.0
        valueMarker.setValue(-1.0);
        
        // Get the current value of the ValueMarker
        double value = valueMarker.getValue();
        
        // Assert that the ValueMarker's value is equal to -1.0, with a tolerance of 0.01
        assertEquals(-1.0, value, 0.01);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testSetValue() throws Throwable  {
        // Given a ValueMarker object with a non-zero value
        ValueMarker valueMarker = new ValueMarker(1.0);
        
        // When the clone method is called on the ValueMarker object
        Object arg0 = valueMarker.clone();
        
        // Then the returned object should have the same value as the original ValueMarker object
        assertEquals(valueMarker.getValue(), ((ValueMarker) arg0).getValue(), 0.01);
        
        // And the equals method should return false when comparing the two objects
        boolean equals = valueMarker.equals(arg0);
        assertFalse(equals);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testEqualsReturningFalse() throws Throwable  {
        // Create a new ValueMarker instance with a value of 1.0
        ValueMarker valueMarker = new ValueMarker(1.0);
        
        // Clone the original ValueMarker instance
        Object arg0 = valueMarker.clone();
        
        // Set the label of the cloned instance to "org.jfree.chart.plot.ValueMarker"
        valueMarker.setLabel("org.jfree.chart.plot.ValueMarker");
        
        // Check if the original instance and the cloned instance are equal
        boolean equals = valueMarker.equals(arg0);
        
        // Assert that the original instance does not equal the cloned instance
        assertFalse(arg0.equals((Object)valueMarker));
        
        // Assert that the two instances are not equal
        assertFalse(equals);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testEqualsReturningTrue() throws Throwable  {
        // Given a ValueMarker instance with the value 104
        ValueMarker valueMarker = new ValueMarker(104);
        
        // When we compare this instance to itself
        boolean equals = valueMarker.equals(valueMarker);
        
        // Then we expect that it is equal to itself
        assertTrue(equals);
        
        // And that the returned value is 104.0 with a tolerance of 0.01
        assertEquals(104.0, valueMarker.getValue(), 0.01);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreatesValueMarkerTakingDouble() throws Throwable  {
        // Given
        ValueMarker valueMarker = new ValueMarker(1.0);
        
        // When
        ValueMarker arg0 = (ValueMarker)valueMarker.clone();
        
        // Then
        assertEquals(1.0, arg0.getValue(), 0.01);
        assertTrue(valueMarker.equals(arg0));
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreatesValueMarkerTaking3Arguments() throws Throwable  {
        // Given an XYBoxAndWhiskerRenderer object and a Paint object
        XYBoxAndWhiskerRenderer xYBoxAndWhiskerRenderer = new XYBoxAndWhiskerRenderer();
        Paint artifactPaint = xYBoxAndWhiskerRenderer.getArtifactPaint();
        
        // When a ValueMarker is created with a value and the paint object
        ValueMarker valueMarker = new ValueMarker(204.96589675571, artifactPaint, xYBoxAndWhiskerRenderer.DEFAULT_OUTLINE_STROKE);
        
        // Then the value marker should have the correct value and paint
        assertEquals(204.96589675571, valueMarker.getValue(), 0.01);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetValueReturningZero() throws Throwable  {
        // Create a new ValueMarker with initial value of 1.0
        ValueMarker valueMarker = new ValueMarker(1.0);
        
        // Set the value to 0.0 using setValue method
        valueMarker.setValue(0.0);
        
        // Get the updated value using getValue method
        double value = valueMarker.getValue();
        
        // Assert that the updated value is equal to 0.0 with a delta of 0.01
        assertEquals(0.0, value, 0.01);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetValueReturningPositive() throws Throwable  {
        // Given: A ValueMarker object is created with a value of 1.0
        ValueMarker valueMarker = new ValueMarker(1.0);
        
        // When: The getValue method is called on the ValueMarker object
        double value = valueMarker.getValue();
        
        // Then: The returned value should be equal to 1.0, with a tolerance of 0.01
        assertEquals(1.0, value, 0.01);
    }
  }
  