content: /*
   * This file was automatically generated by UTestGen and EvoSuite
   * Wed Mar 20 03:54:53 GMT 2024
   */
  
  package org.jfree.data.general;
  
  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.lang.reflect.Array;
  import java.math.BigInteger;
  import java.util.Date;
  import org.evosuite.runtime.EvoRunner;
  import org.evosuite.runtime.EvoRunnerParameters;
  import org.evosuite.runtime.mock.java.util.MockDate;
  import org.evosuite.runtime.mock.java.util.MockGregorianCalendar;
  import org.jfree.data.KeyToGroupMap;
  import org.jfree.data.KeyedValues;
  import org.jfree.data.Range;
  import org.jfree.data.category.CategoryDataset;
  import org.jfree.data.category.DefaultCategoryDataset;
  import org.jfree.data.category.DefaultIntervalCategoryDataset;
  import org.jfree.data.function.Function2D;
  import org.jfree.data.function.LineFunction2D;
  import org.jfree.data.function.NormalDistributionFunction2D;
  import org.jfree.data.gantt.TaskSeriesCollection;
  import org.jfree.data.general.DatasetUtilities;
  import org.jfree.data.general.DefaultKeyedValues2DDataset;
  import org.jfree.data.general.DefaultKeyedValuesDataset;
  import org.jfree.data.general.DefaultPieDataset;
  import org.jfree.data.general.PieDataset;
  import org.jfree.data.statistics.DefaultBoxAndWhiskerCategoryDataset;
  import org.jfree.data.statistics.DefaultStatisticalCategoryDataset;
  import org.jfree.data.statistics.SimpleHistogramDataset;
  import org.jfree.data.time.DynamicTimeSeriesCollection;
  import org.jfree.data.time.Millisecond;
  import org.jfree.data.time.Month;
  import org.jfree.data.time.TimeSeriesCollection;
  import org.jfree.data.time.TimeTableXYDataset;
  import org.jfree.data.xy.CategoryTableXYDataset;
  import org.jfree.data.xy.DefaultOHLCDataset;
  import org.jfree.data.xy.DefaultXYZDataset;
  import org.jfree.data.xy.OHLCDataItem;
  import org.jfree.data.xy.TableXYDataset;
  import org.jfree.data.xy.XYDataset;
  import org.jfree.data.xy.XYSeriesCollection;
  import org.jfree.date.SpreadsheetDate;
  import org.junit.runner.RunWith;
  
  @RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true) 
  public class DatasetUtilities_ESTest extends DatasetUtilities_ESTest_scaffolding {
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testIterateCategoryRangeBoundsReturningRangeWhereGetUpperBoundIsNegative() throws Throwable  {
        // Given a CategoryDataset with three rows and three columns
        double[][] arg2 = new double[3][3];
        double[] doubleArray = new double[1];
        doubleArray[0] = (-2577.937);
        arg2[0] = doubleArray;
        arg2[1] = doubleArray;
        arg2[2] = doubleArray;
        CategoryDataset dataset = DatasetUtilities.createCategoryDataset("yPt}O^tR{GMK0a?", "", arg2);
        
        // When the iterateCategoryRangeBounds method is called on the dataset with argument true
        Range range = DatasetUtilities.iterateCategoryRangeBounds(dataset, true);
        
        // Then the length of the range should be 0.0
        assertEquals(0.0, range.getLength(), 0.01);
        
        // And the returned range should not be null
        assertNotNull(range);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testIterateCategoryRangeBoundsReturningRangeWhereGetLowerBoundIsPositive() throws Throwable  {
        // No Comments were added
        double[] doubleArray = new double[1];
        doubleArray[0] = (double) 37;
        double[][] arg2 = new double[2][7];
        arg2[0] = doubleArray;
        arg2[1] = doubleArray;
        CategoryDataset arg0 = DatasetUtilities.createCategoryDataset("org.jfree.data.time.Year", "siHU).Us\"oUm0HM`4o", arg2);
        Range iterateCategoryRangeBounds = DatasetUtilities.iterateCategoryRangeBounds(arg0, false);
        assertEquals(37.0, iterateCategoryRangeBounds.getCentralValue(), 0.01);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testIterateCategoryRangeBoundsReturningRangeWhereGetCentralValueIsPositive() throws Throwable  {
        // Given a CategoryDataset with multiple categories and one data series
        double[][] categoryData = new double[5][1];
        double[] dataSeries = new double[3];
        dataSeries[2] = Double.POSITIVE_INFINITY;
        categoryData[1] = dataSeries;
        CategoryDataset dataset = DatasetUtilities.createCategoryDataset((String) null, (String) null, categoryData);
        
        // When the iterateCategoryRangeBounds method is called on the dataset with a true argument
        Range range = DatasetUtilities.iterateCategoryRangeBounds(dataset, true);
        
        // Then the lower bound of the range should be 0.0 and the length of the range should be Double.POSITIVE_INFINITY
        assertEquals(0.0, range.getLowerBound(), 0.01);
        assertNotNull(range);
        assertEquals(Double.POSITIVE_INFINITY, range.getLength(), 0.01);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testIterateCategoryRangeBoundsReturningRangeWhereGetCentralValueIsNegative() throws Throwable  {
        // Given a category dataset with a single series containing two data points
        double[][] arg2 = new double[3][1];
        arg2[0] = new double[]{ -2.2222944E12, 2.2222944E12 };
        CategoryDataset arg0 = DatasetUtilities.createCategoryDataset((String) null, (String) null, arg2);
        
        // When the iterateCategoryRangeBounds method is called with the dataset and a boolean argument set to true
        Range iterateCategoryRangeBounds = DatasetUtilities.iterateCategoryRangeBounds(arg0, true);
        
        // Then the range object returned should have a length equal to the difference between the two data points
        assertEquals(2.2222944E12, iterateCategoryRangeBounds.getLength(), 0.01);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFindStackedRangeBoundsTaking1And1ReturningRangeWhereGetCentralValueIsNegative0() throws Throwable  {
        // Create a new TimeTableXYDataset object
        TimeTableXYDataset arg0 = new TimeTableXYDataset();
        
        // Find the stacked range bounds for the given dataset, with the upper bound set to Double.NEGATIVE_INFINITY
        Range findStackedRangeBounds = DatasetUtilities.findStackedRangeBounds((TableXYDataset) arg0, Double.NEGATIVE_INFINITY);
        
        // Assert that the returned value is not null
        assertNotNull(findStackedRangeBounds);
        
        // Assert that the upper bound of the stacked range bounds is equal to Double.NEGATIVE_INFINITY, with a tolerance of 0.01
        assertEquals(Double.NEGATIVE_INFINITY, findStackedRangeBounds.getUpperBound(), 0.01);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFindStackedRangeBoundsTakingTableXYDatasetReturningRangeWhereGetCentralValueIsPositive() throws Throwable  {
        // No Comments were added
        Float arg1 = new Float(686.2132332);
        CategoryTableXYDataset arg0 = new CategoryTableXYDataset();
        arg0.add((Number) arg1, (Number) arg1, "Izib#\"34>nH!)6Yb[", true);
        Range findStackedRangeBounds = DatasetUtilities.findStackedRangeBounds((TableXYDataset) arg0);
        assertEquals(686.2132568359375, findStackedRangeBounds.getUpperBound(), 0.01);
        assertNotNull(findStackedRangeBounds);
        assertEquals(0.0, findStackedRangeBounds.getLowerBound(), 0.01);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFindStackedRangeBoundsTakingTableXYDatasetReturningRangeWhereGetCentralValueIsNegative() throws Throwable  {
        // No Comments were added
        CategoryTableXYDataset arg0 = new CategoryTableXYDataset();
        Float arg1 = new Float((-144.0));
        arg0.add((Number) arg1, (Number) arg1, "Izib#\"34>nH!)6Yb[", false);
        Range findStackedRangeBounds = DatasetUtilities.findStackedRangeBounds((TableXYDataset) arg0);
        assertEquals((-144.0), findStackedRangeBounds.getLowerBound(), 0.01);
        assertNotNull(findStackedRangeBounds);
        assertEquals(0.0, findStackedRangeBounds.getUpperBound(), 0.01);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFindStackedRangeBoundsTaking1And1ReturningRangeWhereGetUpperBoundIsNegative() throws Throwable  {
        // Create a dataset for testing
        double[][] arg2 = new double[5][1];
        CategoryDataset arg0 = DatasetUtilities.createCategoryDataset((String) null, (String) null, arg2);
        
        // Find the stacked range bounds of the dataset
        Range findStackedRangeBounds = DatasetUtilities.findStackedRangeBounds(arg0, Double.NEGATIVE_INFINITY);
        
        // Assert that the range bounds are not null
        assertNotNull(findStackedRangeBounds);
        
        // Assert that the upper bound of the range is equal to the expected value
        assertEquals(Double.NEGATIVE_INFINITY, findStackedRangeBounds.getUpperBound(), 0.01);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFindRangeBoundsTakingXYDataset() throws Throwable  {
        // No Comments were added
        CategoryTableXYDataset arg0 = new CategoryTableXYDataset();
        arg0.add(1.5, (-248.01083), "~sX]tu*`ld'U&z>");
        Range findRangeBounds = DatasetUtilities.findRangeBounds((XYDataset) arg0);
        assertNotNull(findRangeBounds);
        assertEquals(0.0, findRangeBounds.getLength(), 0.01);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFindRangeBoundsTaking1And1ReturningRangeWhereGetUpperBoundIsNegative() throws Throwable  {
        // Create a dataset with two categories and four data points per category
        double[][] arg2 = new double[1][4];
        double[] doubleArray = new double[2];
        doubleArray[0] = (-4269.1824318);
        doubleArray[1] = (-492.613022849);
        arg2[0] = doubleArray;
        
        // Create a category dataset from the array of data points
        CategoryDataset arg0 = DatasetUtilities.createCategoryDataset("sLcPp9/vtN@-[", "", arg2);
        
        // Find the range bounds for the dataset
        Range findRangeBounds = DatasetUtilities.findRangeBounds(arg0, false);
        
        // Check that the central value of the range is close to -2380.8977273245
        assertEquals((-2380.8977273245), findRangeBounds.getCentralValue(), 0.01);
        
        // Check that the range bounds are not null
        assertNotNull(findRangeBounds);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFindRangeBoundsTaking1And1ReturningRangeWhereGetLengthIsZeroAndRangeWhereGetLowerBoundIsPositive() throws Throwable  {
        // Given a dataset with multiple categories and values for each category
        double[][] arg2 = new double[3][5];
        double[] doubleArray = new double[1];
        doubleArray[0] = 632.942636342255;
        arg2[0] = doubleArray;
        arg2[1] = doubleArray;
        arg2[2] = doubleArray;
        CategoryDataset arg0 = DatasetUtilities.createCategoryDataset("+'U{I3<'.", "+'U{I3<'.", arg2);
        
        // When the range bounds are found for the dataset
        Range findRangeBounds = DatasetUtilities.findRangeBounds(arg0, false);
        
        // Then the method returns a non-null range with a length of 0
        assertNotNull(findRangeBounds);
        assertEquals(0.0, findRangeBounds.getLength(), 0.01);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFindRangeBoundsTaking1And1ReturningRangeWhereGetLowerBoundIsZero() throws Throwable  {
        // Create a dataset with three categories and five data points for each category
        double[][] arg2 = new double[3][5];
        double[] doubleArray = new double[1];
        doubleArray[0] = 632.942636342255;
        arg2[0] = doubleArray;
        
        // Create a category dataset with the given data and labels
        CategoryDataset arg0 = DatasetUtilities.createCategoryDataset("+'U{I3<'.", "+'U{I3<'.", arg2);
        
        // Find the range bounds for the given dataset, excluding the labels
        Range findRangeBounds = DatasetUtilities.findRangeBounds(arg0, false);
        
        // Assert that the range bounds are not null
        assertNotNull(findRangeBounds);
        
        // Assert that the length of the range bounds is equal to the expected value, within a tolerance of 0.01
        assertEquals(632.942636342255, findRangeBounds.getLength(), 0.01);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFindRangeBoundsTaking1And1ReturningRangeWhereGetUpperBoundIsZero() throws Throwable  {
        // Test case to verify the functionality of DatasetUtilities.findRangeBounds() method
        // with a category dataset that has a single series and four categories
        // and the "includeOutliers" parameter set to false
        double[][] arg2 = new double[1][4];
        double[] doubleArray = new double[2];
        doubleArray[0] = (-4269.1824318);
        arg2[0] = doubleArray;
        CategoryDataset arg0 = DatasetUtilities.createCategoryDataset("sLcPp9/vtN@-[", "", arg2);
        Range findRangeBounds = DatasetUtilities.findRangeBounds(arg0, false);
        // Verify that the method returns a Range object with the correct values for the central value and the range bounds
        assertEquals((-2134.5912159), findRangeBounds.getCentralValue(), 0.01);
        assertNotNull(findRangeBounds);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFindRangeBoundsTakingCategoryDatasetReturningRangeWhereGetLowerBoundIsPositive() throws Throwable  {
        // Given a dataset with some values
        double[][] arg2 = new double[4][3];
        double[] doubleArray = new double[6];
        doubleArray[0] = (double) 37;
        doubleArray[1] = (double) 37;
        doubleArray[2] = (double) 37;
        doubleArray[3] = (double) 37;
        doubleArray[4] = (double) 37;
        doubleArray[5] = (double) 37;
        arg2[0] = doubleArray;
        arg2[1] = doubleArray;
        arg2[2] = doubleArray;
        arg2[3] = doubleArray;
        
        // When the findRangeBounds method is called with this dataset
        CategoryDataset arg0 = DatasetUtilities.createCategoryDataset("yPt}O^tR{GMK0a?", "org.jfree.data.general.DatasetUtilities", arg2);
        Range findRangeBounds = DatasetUtilities.findRangeBounds(arg0);
        
        // Then the returned range should have a length of 0
        assertEquals(0.0, findRangeBounds.getLength(), 0.01);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFindRangeBoundsTakingCategoryDatasetReturningRangeWhereGetCentralValueIsZero() throws Throwable  {
        double[][] arg2 = new double[7][3];
        CategoryDataset arg0 = DatasetUtilities.createCategoryDataset("yPt}O^tR{GMK0a?", (String) null, arg2);
        Range findRangeBounds = DatasetUtilities.findRangeBounds(arg0);
        assertNotNull(findRangeBounds);
        
        // Test that the returned range has the correct lower bound
        assertEquals(0.0, findRangeBounds.getLowerBound(), 0.01);
        
        // Test that the returned range has the correct upper bound
        assertEquals(360.0, findRangeBounds.getUpperBound(), 0.01);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFindRangeBoundsTakingCategoryDataset() throws Throwable  {
        // Given a dataset with multiple data series
        double[][] arg2 = new double[4][3];
        double[] doubleArray = new double[6];
        doubleArray[0] = (double) 37;
        arg2[0] = doubleArray;
        CategoryDataset arg0 = DatasetUtilities.createCategoryDataset("yPt}O^tR{GMK0a?", "org.jfree.data.general.DatasetUtilities", arg2);
        
        // When the range bounds are found for the dataset
        Range findRangeBounds = DatasetUtilities.findRangeBounds(arg0);
        
        // Then the upper and lower bounds of the range should be equal to the value in the first data series
        assertNotNull(findRangeBounds);
        assertEquals(37.0, findRangeBounds.getUpperBound(), 0.01);
        assertEquals(0.0, findRangeBounds.getLowerBound(), 0.01);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFindRangeBoundsTakingCategoryDatasetReturningRangeWhereGetCentralValueIsNegative() throws Throwable  {
        // No Comments were added
        double[][] arg2 = new double[1][6];
        double[] doubleArray = new double[6];
        doubleArray[0] = (-162.40716701125);
        arg2[0] = doubleArray;
        CategoryDataset arg0 = DatasetUtilities.createCategoryDataset("vNkgXX07\",", "", arg2);
        Range findRangeBounds = DatasetUtilities.findRangeBounds(arg0);
        assertEquals((-162.40716701125), findRangeBounds.getLowerBound(), 0.01);
        assertNotNull(findRangeBounds);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFindCumulativeRangeBoundsReturningRangeWhereGetUpperBoundIsPositive() throws Throwable  {
        // Given a CategoryDataset with two categories and six data sets
        double[][] arg2 = new double[6][2];
        
        // When we call findCumulativeRangeBounds on the dataset
        CategoryDataset arg0 = DatasetUtilities.createCategoryDataset("8M|S-HsLV+", "8M|S-HsLV+", arg2);
        Range findCumulativeRangeBounds = DatasetUtilities.findCumulativeRangeBounds(arg0);
        
        // Then the method should return a Range with Double.NaN as its lower bound
        assertNotNull(findCumulativeRangeBounds);
        assertEquals(Double.NaN, findCumulativeRangeBounds.getLowerBound(), 0.01);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFindCumulativeRangeBounds() throws Throwable  {
        double[][] arg2 = new double[3][3];
        // Initializing a two-dimensional array with the first row containing a single element representing a negative value for testing purposes
        double[] doubleArray = new double[1];
        doubleArray[0] = (-2577.937);
        arg2[0] = doubleArray;
        // Creating a CategoryDataset object using the 2D array and setting its labels to "yPt}O^tR{GMK0a?" and "" for the x-axis and y-axis, respectively
        CategoryDataset arg0 = DatasetUtilities.createCategoryDataset("yPt}O^tR{GMK0a?", "", arg2);
        // Finding the cumulative range bounds of the dataset using the findCumulativeRangeBounds() method from DatasetUtilities
        Range findCumulativeRangeBounds = DatasetUtilities.findCumulativeRangeBounds(arg0);
        // Asserting that the upper bound of the Range object is equal to 0 with a tolerance of 0.01
        assertEquals(0.0, findCumulativeRangeBounds.getUpperBound(), 0.01);
        // Asserting that the returned Range object is not null
        assertNotNull(findCumulativeRangeBounds);
        // Asserting that the central value of the Range object is equal to -1288.9685 with a tolerance of 0.01
        assertEquals((-1288.9685), findCumulativeRangeBounds.getCentralValue(), 0.01);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFindStackedRangeBoundsTaking1And1ReturningNullAndFindStackedRangeBoundsTaking1And10() throws Throwable  {
        // Create a new default category dataset
        DefaultCategoryDataset arg0 = new DefaultCategoryDataset();
        
        // Find the stacked range bounds for the specified dataset and value
        Range findStackedRangeBounds = DatasetUtilities.findStackedRangeBounds((CategoryDataset) arg0, 2154.343);
        
        // Verify that the returned range is null (since no data was found in the dataset)
        assertNull(findStackedRangeBounds);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreateCategoryDatasetTaking2StringsAnd1AndFindStackedRangeBoundsTaking1And10() throws Throwable  {
        // Given a dataset with positive infinity in one of the values
        double[][] data = new double[3][8];
        double[] values = new double[9];
        values[5] = Double.POSITIVE_INFINITY;
        data[0] = values;
        CategoryDataset dataset = DatasetUtilities.createCategoryDataset("@tP15?$W", "x", data);
        
        // When the stacked range bounds are found for the dataset
        Range bounds = DatasetUtilities.findStackedRangeBounds(dataset, Double.POSITIVE_INFINITY);
        
        // Then the method should return null as there is no valid range bounds in the dataset
        assertNull(bounds);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testIterateCategoryRangeBoundsReturningNull() throws Throwable  {
        // rollbacked to evosuite
        TaskSeriesCollection arg0 = new TaskSeriesCollection();
        Range iterateCategoryRangeBounds = DatasetUtilities.iterateCategoryRangeBounds(arg0, true);
        assertNull(iterateCategoryRangeBounds);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreateCategoryDatasetTaking2StringsAnd1WithNullAndIterateCategoryRangeBoundsWithNonNull() throws Throwable  {
        double[][] data = new double[3][1]; // Initialize a 2D array with 3 rows and 1 column for testing purpose
        CategoryDataset dataset = DatasetUtilities.createCategoryDataset((String) null, (String) null, data);
        Range categoryRangeBounds = DatasetUtilities.iterateCategoryRangeBounds(dataset, true); // Iterate through the category range bounds of the dataset using the provided method
        assertEquals(0.0, categoryRangeBounds.getLowerBound(), 0.01); // Check that the lower bound of the range is equal to 0.0 within a tolerance of 0.01
        assertNotNull(categoryRangeBounds); // Check that the categoryRangeBounds is not null
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFindRangeBoundsTaking1And1() throws Throwable  {
        // Given a TimeSeriesCollection instance and a flag indicating whether the search should be performed on an entire dataset or only on visible data points
        TimeSeriesCollection arg0 = new TimeSeriesCollection();
        boolean isEntireDataset = true;
        
        // When findRangeBounds method is called with the above arguments
        Range rangeBounds = DatasetUtilities.findRangeBounds((XYDataset) arg0, isEntireDataset);
        
        // Then the method should return null since there are no data points in the collection
        assertNull(rangeBounds);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testIterateDomainBoundsTaking2Arguments() throws Throwable  {
        // Given a DefaultXYZDataset object "arg0"
        DefaultXYZDataset arg0 = new DefaultXYZDataset();
        
        // When the iterateDomainBounds method is called on the XYDataset object
        Range iterateDomainBounds = DatasetUtilities.iterateDomainBounds((XYDataset) arg0, true);
        
        // Then the returned value should be null
        assertNull(iterateDomainBounds);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFindDomainBoundsTaking2Arguments() throws Throwable  {
        // Given a XYSeriesCollection with no data
        XYSeriesCollection arg0 = new XYSeriesCollection();
        
        // When we find the domain bounds of this collection
        Range findDomainBounds = DatasetUtilities.findDomainBounds((XYDataset) arg0, true);
        
        // Then we expect the result to be null
        assertNull(findDomainBounds);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreatePieDatasetForColumnTaking1And1AndCreatePieDatasetForColumnTaking1And10() throws Throwable  {
        // Given a TaskSeriesCollection object
        TaskSeriesCollection taskSeriesCollection = new TaskSeriesCollection();
        
        // When we create a pie dataset for column 1 of the CategoryDataset
        PieDataset pieDatasetForColumn = DatasetUtilities.createPieDatasetForColumn((CategoryDataset) taskSeriesCollection, 1);
        
        // Then the item count of the pie dataset should be equal to zero
        assertEquals(0, pieDatasetForColumn.getItemCount());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCalculatePieDatasetTotal() throws Throwable  {
        // No Comments were added
        DefaultPieDataset arg0 = new DefaultPieDataset();
        Short arg1 = new Short((short)100);
        arg0.setValue((Comparable) "Q", (Number) arg1);
        double calculatePieDatasetTotal = DatasetUtilities.calculatePieDatasetTotal(arg0);
        assertEquals(100.0, calculatePieDatasetTotal, 0.01);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFindCumulativeRangeBoundsReturningRangeWhereGetLowerBoundIsZero() throws Throwable  {
        // Given: A CategoryDataset with a single series of doubles
        double[][] arg2 = new double[3][3];
        double[] doubleArray = new double[1];
        arg2[0] = doubleArray;
        CategoryDataset dataset = DatasetUtilities.createCategoryDataset("yPt}O^tR{GMK0a?", "", arg2);
        
        // When: We find the cumulative range bounds of the dataset
        Range cumulativeRangeBounds = DatasetUtilities.findCumulativeRangeBounds(dataset);
        
        // Then: The lower bound is 0, and the length is 0 (since there are no values in the dataset)
        assertNotNull(cumulativeRangeBounds);
        assertEquals(0.0, cumulativeRangeBounds.getLowerBound(), 0.01);
        assertEquals(0.0, cumulativeRangeBounds.getLength(), 0.01);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFindCumulativeRangeBoundsThrowsIllegalArgumentException() throws Throwable  {
        // Test that null 'dataset' argument throws an IllegalArgumentException
        try {
        DatasetUtilities.findCumulativeRangeBounds((CategoryDataset) null);
        fail("Expecting exception: IllegalArgumentException");
        
        } catch(IllegalArgumentException e) {
        //
        // Null 'dataset' argument is not valid, so we should throw an exception
        //
        verifyException("org.jfree.data.general.DatasetUtilities", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFindCumulativeRangeBoundsReturningNull() throws Throwable  {
        // Given a collection of task series
        TaskSeriesCollection taskSeries = new TaskSeriesCollection();
        
        // When we find the cumulative range bounds for that collection
        Range cumulativeRangeBounds = DatasetUtilities.findCumulativeRangeBounds(taskSeries);
        
        // Then the method should return null
        assertNull(cumulativeRangeBounds);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFindStackedRangeBoundsTaking1And1() throws Throwable  {
        // Create a CategoryTableXYDataset instance with data
        CategoryTableXYDataset arg0 = new CategoryTableXYDataset();
        arg0.add(1110.0, 1110.0, "org.jfree.data.UnknownKeyException");
        
        // Use the DatasetUtilities.findStackedRangeBounds() method to find the range bounds for a stacked dataset
        Range findStackedRangeBounds = DatasetUtilities.findStackedRangeBounds((TableXYDataset) arg0, (-1.0));
        
        // Check that the length of the range is equal to 1110.0 within a tolerance of 0.01
        assertEquals(1110.0, findStackedRangeBounds.getLength(), 0.01);
        
        // Check that the method returns a non-null result
        assertNotNull(findStackedRangeBounds);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFindStackedRangeBoundsTaking1And1ReturningRangeWhereGetLowerBoundIsPositive() throws Throwable  {
        // Given: we have a CategoryTableXYDataset named "arg0" with a single data point (x = 1.5, y = -248.01083) and a value for the stacked range bounds (3004.0).
        CategoryTableXYDataset arg0 = new CategoryTableXYDataset();
        arg0.add(1.5, (-248.01083), "~sX]tu*`ld'U&z>");
        Range findStackedRangeBounds = DatasetUtilities.findStackedRangeBounds((TableXYDataset) arg0, 3004.0);
        // When: we call the method "findStackedRangeBounds" with the "arg0" dataset and the value for the stacked range bounds (3004.0).
        // Then: we expect the method to return a Range object with a lower bound of 2755.98917 and an upper bound of 3004.0, with a maximum absolute error of 0.01.
        assertEquals(2755.98917, findStackedRangeBounds.getLowerBound(), 0.01);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFindStackedRangeBoundsTaking1And1ThrowsIllegalArgumentExceptionAndFindStackedRangeBoundsTaking1And10() throws Throwable  {
        // Undeclared exception!
        try {
        DatasetUtilities.findStackedRangeBounds((TableXYDataset) null, (-2332.5));
        fail("Expecting exception: IllegalArgumentException");
        
        } catch(IllegalArgumentException e) {
        //
        // Null 'dataset' argument.
        //
        verifyException("org.jfree.data.general.DatasetUtilities", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFindMaximumStackedRangeValueWithNonNull() throws Throwable  {
        // Given a dataset with two categories and seven data points
        double[][] arg2 = new double[2][1];
        double[] doubleArray = new double[7];
        doubleArray[5] = 1.0;
        arg2[0] = doubleArray;
        CategoryDataset arg0 = DatasetUtilities.createCategoryDataset("BYt*~", (String) null, arg2);
        
        // When finding the maximum stacked range value in the dataset
        Number findMaximumStackedRangeValue = DatasetUtilities.findMaximumStackedRangeValue(arg0);
        
        // Then the maximum stacked range value should be equal to 1.0
        assertEquals(1.0, findMaximumStackedRangeValue);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFindMaximumStackedRangeValueReturningNull() throws Throwable  {
        // Test that findMaximumStackedRangeValue returns null when given a null dataset.
        
        Number actual = DatasetUtilities.findMaximumStackedRangeValue((CategoryDataset) null);
        assertNull(actual);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFindMinimumStackedRangeValueWithNonNull() throws Throwable  {
        // No Comments were added
        DefaultKeyedValues2DDataset arg0 = new DefaultKeyedValues2DDataset();
        Integer arg2 = new Integer((-3088));
        arg0.addValue((Number) arg2, (Comparable) arg2, (Comparable) arg2);
        Number findMinimumStackedRangeValue = DatasetUtilities.findMinimumStackedRangeValue(arg0);
        assertEquals((-3088.0), findMinimumStackedRangeValue);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFindMinimumStackedRangeValueThrowsIllegalArgumentException() throws Throwable  {
        // Given a DefaultIntervalCategoryDataset with invalid series index
        Number[][] arg1 = new Number[4][7];
        DefaultIntervalCategoryDataset arg0 = new DefaultIntervalCategoryDataset(arg1, arg1);
        
        // When the method is called with an invalid series index
        try {
        DatasetUtilities.findMinimumStackedRangeValue(arg0);
        
        // Then an IllegalArgumentException is thrown
        fail("Expecting exception: IllegalArgumentException");
        } catch (IllegalArgumentException e) {
        // Verify that the correct exception is thrown
        verifyException("org.jfree.data.category.DefaultIntervalCategoryDataset", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFindMinimumStackedRangeValue() throws Throwable  {
        // Given a dataset containing only positive values
        double[][] arg1 = new double[1][1];
        arg1[0][0] = 5;
        DefaultIntervalCategoryDataset arg0 = new DefaultIntervalCategoryDataset(arg1, arg1);
        
        // When finding the minimum stacked range value
        Number findMinimumStackedRangeValue = DatasetUtilities.findMinimumStackedRangeValue(arg0);
        
        // Then the result should be 0 (the minimum positive value)
        assertEquals(0.0, findMinimumStackedRangeValue);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFindMinimumStackedRangeValueReturningNull() throws Throwable  {
        // No Comments were added
        Number findMinimumStackedRangeValue = DatasetUtilities.findMinimumStackedRangeValue((CategoryDataset) null);
        assertNull(findMinimumStackedRangeValue);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFindStackedRangeBoundsTaking1And1ReturningRangeWhereGetCentralValueIsNegative1() throws Throwable  {
        // No Comments were added
        double[][] arg2 = new double[2][8];
        double[] doubleArray = new double[4];
        doubleArray[0] = (-208.0232075022);
        arg2[0] = doubleArray;
        CategoryDataset arg0 = DatasetUtilities.createCategoryDataset("yPt}O^tR{GMK0a?", "[Z\"kq/R", arg2);
        KeyToGroupMap arg1 = new KeyToGroupMap();
        Range findStackedRangeBounds = DatasetUtilities.findStackedRangeBounds(arg0, arg1);
        assertEquals((-208.0232075022), findStackedRangeBounds.getLowerBound(), 0.01);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFindStackedRangeBoundsTaking1And1ReturningRangeWhereGetCentralValueIsPositive() throws Throwable  {
        // Given a CategoryDataset and a KeyToGroupMap
        double[][] arg2 = new double[4][3];
        double[] doubleArray = new double[6];
        doubleArray[0] = (double) 37;
        arg2[0] = doubleArray;
        CategoryDataset dataset = DatasetUtilities.createCategoryDataset("yPt}O^tR{GMK0a?", "org.jfree.data.general.DatasetUtilities", arg2);
        KeyToGroupMap keyToGroupMap = new KeyToGroupMap();
        
        // When the method findStackedRangeBounds is called on the dataset and map
        Range stackedRangeBounds = DatasetUtilities.findStackedRangeBounds(dataset, keyToGroupMap);
        
        // Then the returned range should have a length of 37.0, with an error tolerance of 0.01
        assertEquals(37.0, stackedRangeBounds.getLength(), 0.01);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFindStackedRangeBoundsTaking1And1ReturningRangeWhereGetCentralValueIsZero() throws Throwable  {
        // Given a dataset with multiple series
        double[][] arg2 = new double[7][3];
        double[] doubleArray = new double[1];
        arg2[0] = doubleArray;
        CategoryDataset dataset = DatasetUtilities.createCategoryDataset("yPt}O^tR{GMK0a?", (String) null, arg2);
        
        // When the findStackedRangeBounds method is called with the dataset and a KeyToGroupMap
        Range range = DatasetUtilities.findStackedRangeBounds(dataset, new KeyToGroupMap());
        
        // Then the length of the range should be 0
        assertEquals(0.0, range.getLength(), 0.01);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFindStackedRangeBoundsTaking1And1ReturningNullAndFindStackedRangeBoundsTaking1And11() throws Throwable  {
        // Given a CategoryDataset with some data
        KeyToGroupMap arg1 = new KeyToGroupMap();
        
        // When the method findStackedRangeBounds is called with the dataset and the key to group map
        Range actualRange = DatasetUtilities.findStackedRangeBounds((CategoryDataset) null, arg1);
        
        // Then the range should be null as there is no data in the dataset
        assertNull(actualRange);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreateCategoryDatasetTaking2StringsAnd1AndFindStackedRangeBoundsTaking1And11() throws Throwable  {
        // No Comments were added
        double[][] arg2 = new double[3][8];
        double[] doubleArray = new double[9];
        doubleArray[0] = (-675.0778087526);
        arg2[0] = doubleArray;
        CategoryDataset arg0 = DatasetUtilities.createCategoryDataset("@tP15?$W", "x", arg2);
        Range findStackedRangeBounds = DatasetUtilities.findStackedRangeBounds(arg0, Double.POSITIVE_INFINITY);
        assertEquals(Double.POSITIVE_INFINITY, findStackedRangeBounds.getLowerBound(), 0.01);
        assertNotNull(findStackedRangeBounds);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFindStackedRangeBoundsTakingCategoryDatasetReturningRangeWhereGetUpperBoundIsPositive() throws Throwable  {
        // Test for a dataset with a single stacked series
        double[][] arg2 = new double[1][2];
        double[] doubleArray = new double[9];
        doubleArray[0] = 1.123452E31;
        arg2[0] = doubleArray;
        CategoryDataset arg0 = DatasetUtilities.createCategoryDataset("", "", arg2);
        Range findStackedRangeBounds = DatasetUtilities.findStackedRangeBounds(arg0);
        assertEquals(0.0, findStackedRangeBounds.getLowerBound(), 0.01);
        assertEquals(5.61726E30, findStackedRangeBounds.getCentralValue(), 0.01);
        assertNotNull(findStackedRangeBounds);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFindStackedRangeBoundsTaking1And1ReturningRangeWhereGetLengthIsZero() throws Throwable  {
        // Given a dataset containing a single data series with 5 data points
        double[][] data = new double[5][1];
        CategoryDataset dataset = DatasetUtilities.createCategoryDataset((String) null, (String) null, data);
        
        // When the method findStackedRangeBounds is called on the dataset with a certain value
        double targetValue = 386.13369999999986;
        Range stackedRangeBounds = DatasetUtilities.findStackedRangeBounds(dataset, targetValue);
        
        // Then the method should return a non-null range that includes the target value
        assertNotNull(stackedRangeBounds);
        
        // And the range should have a length of 0
        assertEquals(0.0, stackedRangeBounds.getLength(), 0.01);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFindStackedRangeBoundsTaking1And1ThrowsIllegalArgumentExceptionAndFindStackedRangeBoundsTaking1And11() throws Throwable  {
        // No Comments were added
        // Undeclared exception!
        try { 
          DatasetUtilities.findStackedRangeBounds((CategoryDataset) null, 739.750792);
          fail("Expecting exception: IllegalArgumentException");
        
        } catch(IllegalArgumentException e) {
           //
           // Null 'dataset' argument.
           //
           verifyException("org.jfree.data.general.DatasetUtilities", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFindMaximumRangeValueTakingXYDatasetThrowsIllegalArgumentException() throws Throwable  {
        // Given a null 'dataset' argument.
        try {
        DatasetUtilities.findMaximumRangeValue((XYDataset) null);
        fail("Expecting exception: IllegalArgumentException");
        
        } catch(IllegalArgumentException e) {
        // Null 'dataset' argument.
        verifyException("org.jfree.data.general.DatasetUtilities", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreateCategoryDatasetTaking2StringsAnd1WithNull() throws Throwable  {
        // Given a dataset with multiple categories and sub-categories
        double[][] arg2 = new double[20][3];
        double[] doubleArray = new double[1];
        arg2[0] = doubleArray;
        CategoryDataset arg0 = DatasetUtilities.createCategoryDataset("yPt}O^tR{GLK0]a?", (String) null, arg2);
        
        // When the maximum range value is found in the dataset
        Number findMaximumRangeValue = DatasetUtilities.findMaximumRangeValue(arg0);
        
        // Then the expected result is returned
        assertEquals(0.0, findMaximumRangeValue);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFindMaximumRangeValueTakingCategoryDataset() throws Throwable  {
        // No Comments were added
        double[][] arg1 = new double[1][7];
        DefaultIntervalCategoryDataset arg0 = new DefaultIntervalCategoryDataset(arg1, arg1);
        Number findMaximumRangeValue = DatasetUtilities.findMaximumRangeValue((CategoryDataset) arg0);
        assertEquals(0.0, findMaximumRangeValue);
        assertNotNull(findMaximumRangeValue);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFindMaximumRangeValueTakingCategoryDatasetWithNonNull() throws Throwable  {
        DefaultStatisticalCategoryDataset arg0 = new DefaultStatisticalCategoryDataset();
        // Create a new instance of the DefaultStatisticalCategoryDataset class and initialize it with some data
        Number findMaximumRangeValue = DatasetUtilities.findMaximumRangeValue((CategoryDataset) arg0);
        // Assert that the findMaximumRangeValue method returns the expected value (Double.NaN)
        assertEquals(Double.NaN, findMaximumRangeValue);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFindMaximumRangeValueTakingCategoryDatasetThrowsIllegalArgumentException() throws Throwable  {
        // No Comments were added
        // Undeclared exception!
        try { 
          DatasetUtilities.findMaximumRangeValue((CategoryDataset) null);
          fail("Expecting exception: IllegalArgumentException");
        
        } catch(IllegalArgumentException e) {
           //
           // Null 'dataset' argument.
           //
           verifyException("org.jfree.data.general.DatasetUtilities", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFindMaximumRangeValueTakingCategoryDatasetReturningNull() throws Throwable  {
        // No Comments were added
        DefaultCategoryDataset arg0 = new DefaultCategoryDataset();
        Number findMaximumRangeValue = DatasetUtilities.findMaximumRangeValue((CategoryDataset) arg0);
        assertNull(findMaximumRangeValue);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFindMinimumRangeValueTakingXYDatasetThrowsIllegalArgumentException() throws Throwable  {
        // Undeclared exception!
        try {
        DatasetUtilities.findMinimumRangeValue((XYDataset) null);
        fail("Expecting exception: IllegalArgumentException");
        
        } catch(IllegalArgumentException e) {
        //
        // Null 'dataset' argument.
        //
        verifyException("org.jfree.data.general.DatasetUtilities", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFindMinimumRangeValueTakingXYDataset() throws Throwable  {
        // Given a dynamic time series collection with data points for multiple series
        DynamicTimeSeriesCollection arg0 = new DynamicTimeSeriesCollection(999, 181, new Millisecond());
        
        // When the method is called to find the minimum range value in the dataset
        Number findMinimumRangeValue = DatasetUtilities.findMinimumRangeValue((XYDataset) arg0);
        
        // Then the method should return the minimum value in the dataset, which is 0.0
        assertEquals(0.0, findMinimumRangeValue);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreateCategoryDatasetTaking2StringsAnd1WithEmptyString() throws Throwable  {
        // Create a 2x3 dataset with all values equal to 0.0
        double[][] arg2 = new double[3][2];
        for (int i = 0; i < 3; i++) {
        arg2[i] = new double[] {0.0, 0.0};
        }
        // Create a dataset with the same values as the 2x3 dataset
        CategoryDataset arg0 = DatasetUtilities.createCategoryDataset("", "", arg2);
        // Find the minimum range value in the dataset
        Number findMinimumRangeValue = DatasetUtilities.findMinimumRangeValue(arg0);
        // Assert that the minimum range value is not null and equals 0.0
        assertNotNull(findMinimumRangeValue);
        assertEquals(0.0, findMinimumRangeValue);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFindMinimumRangeValueTakingCategoryDataset() throws Throwable  {
        // Given a dataset with one column and one row
        double[][] data = new double[1][1];
        DefaultIntervalCategoryDataset dataset = new DefaultIntervalCategoryDataset(data, data);
        
        // When the minimum range value is found
        Number minimumRangeValue = DatasetUtilities.findMinimumRangeValue((CategoryDataset) dataset);
        
        // Then the result should not be null and equal to 0.0
        assertNotNull(minimumRangeValue);
        assertEquals(0.0, minimumRangeValue);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFindMinimumRangeValueTakingCategoryDatasetWithNonNull() throws Throwable  {
        // Given a dataset with no values
        DefaultStatisticalCategoryDataset dataset = new DefaultStatisticalCategoryDataset();
        
        // When finding the minimum range value of the dataset
        Number minimumRangeValue = DatasetUtilities.findMinimumRangeValue((CategoryDataset) dataset);
        
        // Then the minimum range value is NaN (not a number)
        assertEquals(Double.NaN, minimumRangeValue);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFindMinimumRangeValueTakingCategoryDatasetThrowsIllegalArgumentException() throws Throwable  {
        try {
        DatasetUtilities.findMinimumRangeValue((CategoryDataset) null);
        fail("Expecting exception: IllegalArgumentException");
        } catch(IllegalArgumentException e) {
        // Verify that the correct exception was thrown.
        verifyException("org.jfree.data.general.DatasetUtilities", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFindMinimumRangeValueTakingCategoryDatasetReturningNull() throws Throwable  {
        // No Comments were added
        DefaultCategoryDataset arg0 = new DefaultCategoryDataset();
        Number findMinimumRangeValue = DatasetUtilities.findMinimumRangeValue((CategoryDataset) arg0);
        assertNull(findMinimumRangeValue);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFindMaximumDomainValueThrowsNullPointerException() throws Throwable  {
        OHLCDataItem[] arg1 = new OHLCDataItem[6];
        // Create a dataset with null as its domain value.
        DefaultOHLCDataset arg0 = new DefaultOHLCDataset((Comparable) null, arg1);
        
        // Expect a NullPointerException when trying to find the maximum domain value of a dataset with null as its domain value.
        try {
        DatasetUtilities.findMaximumDomainValue(arg0);
        fail("Expected exception: NullPointerException");
        
        } catch(NullPointerException e) {
        //
        // Verify that the expected exception is thrown, and that it has no message (getMessage() returned null).
        //
        verifyException("org.jfree.data.xy.DefaultOHLCDataset", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFindMaximumDomainValueThrowsIllegalArgumentException() throws Throwable  {
        // Undeclared exception!
        try {
        DatasetUtilities.findMaximumDomainValue((XYDataset) null);
        fail("Expecting exception: IllegalArgumentException");
        
        } catch(IllegalArgumentException e) {
        // Test that a null 'dataset' argument throws an exception.
        verifyException("org.jfree.data.general.DatasetUtilities", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFindMaximumDomainValue() throws Throwable  {
        // Given a TimeTableXYDataset object with some data
        TimeTableXYDataset dataset = new TimeTableXYDataset();
        
        // When the findMaximumDomainValue method is called on that dataset
        Number maxDomainValue = DatasetUtilities.findMaximumDomainValue(dataset);
        
        // Then the method should return a Double.NaN value
        assertEquals(Double.NaN, maxDomainValue);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFindMinimumDomainValueThrowsIllegalArgumentException() throws Throwable  {
        try {
        DatasetUtilities.findMinimumDomainValue((XYDataset) null);
        fail("Expecting exception: IllegalArgumentException");
        } catch(IllegalArgumentException e) {
        verifyException("org.jfree.data.general.DatasetUtilities", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testIterateCategoryRangeBounds() throws Throwable  {
        // Given a dataset with 9 categories and 2 series
        double[][] data = new double[9][2];
        DefaultIntervalCategoryDataset dataset = new DefaultIntervalCategoryDataset(data, data);
        
        // When iterating over the category range bounds
        Range iterateCategoryRangeBounds = DatasetUtilities.iterateCategoryRangeBounds(dataset, true);
        
        // Then the upper bound of the first category is 0.0
        assertNotNull(iterateCategoryRangeBounds);
        assertEquals(0.0, iterateCategoryRangeBounds.getUpperBound(), 0.01);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFindRangeBoundsTaking1And1ReturningNull() throws Throwable  {
        DefaultCategoryDataset dataset = new DefaultCategoryDataset();
        // Given an empty dataset
        
        Range rangeBounds = DatasetUtilities.findRangeBounds((CategoryDataset) dataset, true);
        // When finding the range bounds for a dataset with no values
        
        assertNull(rangeBounds);
        // Then the method should return null since there are no values in the dataset
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFindRangeBoundsTaking1And1ThrowsIllegalArgumentExceptionAndFindRangeBoundsTaking1And10() throws Throwable  {
        // No Comments were added
        // Undeclared exception!
        try { 
          DatasetUtilities.findRangeBounds((XYDataset) null, true);
          fail("Expecting exception: IllegalArgumentException");
        
        } catch(IllegalArgumentException e) {
           //
           // Null 'dataset' argument.
           //
           verifyException("org.jfree.data.general.DatasetUtilities", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFindRangeBoundsTaking1And1ReturningRangeWhereGetCentralValueIsZero() throws Throwable  {
        // No Comments were added
        DefaultBoxAndWhiskerCategoryDataset arg0 = new DefaultBoxAndWhiskerCategoryDataset();
        Range findRangeBounds = DatasetUtilities.findRangeBounds((CategoryDataset) arg0, true);
        assertEquals(0.0, findRangeBounds.getUpperBound(), 0.01);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFindRangeBoundsTaking1And1ThrowsIllegalArgumentExceptionAndFindRangeBoundsTaking1And11() throws Throwable  {
        // No Comments were added
        // Undeclared exception!
        try { 
          DatasetUtilities.findRangeBounds((CategoryDataset) null, true);
          fail("Expecting exception: IllegalArgumentException");
        
        } catch(IllegalArgumentException e) {
           //
           // Null 'dataset' argument.
           //
           verifyException("org.jfree.data.general.DatasetUtilities", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testIterateDomainBoundsTaking2ArgumentsThrowsIllegalArgumentException() throws Throwable  {
        // Tests the behavior of DatasetUtilities.iterateDomainBounds() when given a null dataset.
        // The test verifies that the method throws an IllegalArgumentException as expected.
        try {
        DatasetUtilities.iterateDomainBounds((XYDataset) null, true);
        fail("Expecting exception: IllegalArgumentException");
        } catch(IllegalArgumentException e) {
        // This is the expected behavior of the method.
        verifyException("org.jfree.data.general.DatasetUtilities", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFindMinimumDomainValue() throws Throwable  {
        // Given a CategoryTableXYDataset object with data
        CategoryTableXYDataset dataset = new CategoryTableXYDataset();
        
        // When we find the minimum domain value of the dataset
        Number minDomainValue = DatasetUtilities.findMinimumDomainValue(dataset);
        
        // Then the result should be Double.NaN (not a number) since the dataset is empty
        assertEquals(Double.NaN, minDomainValue);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFindDomainBoundsTaking2ArgumentsThrowsIllegalArgumentException() throws Throwable  {
        // No Comments were added
        // Undeclared exception!
        try { 
          DatasetUtilities.findDomainBounds((XYDataset) null, false);
          fail("Expecting exception: IllegalArgumentException");
        
        } catch(IllegalArgumentException e) {
           //
           // Null 'dataset' argument.
           //
           verifyException("org.jfree.data.general.DatasetUtilities", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testIsEmptyOrNullTakingXYDataset() throws Throwable  {
        // No Comments were added
        boolean emptyOrNull = DatasetUtilities.isEmptyOrNull((XYDataset) null);
        assertTrue(emptyOrNull);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testIsEmptyOrNullTakingCategoryDataset() throws Throwable  {
        // Given a dataset with a single row and a single column,
        // where the only value in the dataset is an empty array of doubles.
        double[][] arg1 = new double[1][1];
        arg1[0] = new double[0];
        DefaultIntervalCategoryDataset data = new DefaultIntervalCategoryDataset(arg1, arg1);
        
        // When we check if the dataset is empty or null,
        boolean isEmptyOrNull = DatasetUtilities.isEmptyOrNull((CategoryDataset) data);
        
        // Then we expect the result to be true, since the dataset is empty and null.
        assertTrue(isEmptyOrNull);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testIsEmptyOrNullTakingCategoryDatasetReturningFalse() throws Throwable  {
        // Given a dataset containing one interval category
        double[][] data = new double[1][1];
        DefaultIntervalCategoryDataset dataset = new DefaultIntervalCategoryDataset(data, data);
        
        // When the dataset is checked for emptiness or nullity
        boolean emptyOrNull = DatasetUtilities.isEmptyOrNull((CategoryDataset) dataset);
        
        // Then the dataset should not be considered empty or null
        assertFalse(emptyOrNull);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testIsEmptyOrNullTakingCategoryDatasetWithNull() throws Throwable  {
        // Check if the dataset is null or empty
        boolean emptyOrNull = DatasetUtilities.isEmptyOrNull((CategoryDataset) null);
        
        // Assert that the dataset is empty or null
        assertTrue(emptyOrNull, "The dataset should be empty or null");
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testIsEmptyOrNullTakingCategoryDatasetWithNonNull() throws Throwable  {
        // Given: A CategoryDataset object is created with a null or empty value
        DefaultKeyedValues2DDataset dataset = new DefaultKeyedValues2DDataset();
        
        // When: The DatasetUtilities.isEmptyOrNull method is called on the dataset
        boolean emptyOrNull = DatasetUtilities.isEmptyOrNull((CategoryDataset) dataset);
        
        // Then: The result should be true, as the dataset is null or empty
        assertTrue(emptyOrNull);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testIsEmptyOrNullTakingPieDatasetWithNull() throws Throwable  {
        // No Comments were added
        boolean emptyOrNull = DatasetUtilities.isEmptyOrNull((PieDataset) null);
        assertTrue(emptyOrNull);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testIsEmptyOrNullTakingPieDataset() throws Throwable  {
        // Given: A new DefaultKeyedValuesDataset object
        DefaultKeyedValuesDataset dataset = new DefaultKeyedValuesDataset();
        
        // When: The dataset is checked for emptiness or nullity
        boolean emptyOrNull = DatasetUtilities.isEmptyOrNull((PieDataset) dataset);
        
        // Then: The dataset is found to be empty and null
        assertTrue(emptyOrNull);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testSampleFunction2D() throws Throwable  {
        // Create a normal distribution function with mean of 1 and infinite variance
        NormalDistributionFunction2D arg0 = new NormalDistributionFunction2D(1.0, Double.POSITIVE_INFINITY);
        
        // Create an instance of Millisecond to use for the sample function
        Millisecond arg4 = new Millisecond();
        
        // Sample a 2D function from the normal distribution function using the given parameters
        XYSeriesCollection sampleFunction2D = (XYSeriesCollection)DatasetUtilities.sampleFunction2D(arg0, (-2111.02938441), (-1.0), 819, arg4);
        
        // Assert that the interval width of the sampled function is within a certain tolerance of 1.0
        assertEquals(1.0, sampleFunction2D.getIntervalWidth(), 0.01);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testSampleFunction2DThrowsIllegalArgumentException() throws Throwable  {
        // Create a NormalDistributionFunction2D instance with negative values for mu and sigma
        NormalDistributionFunction2D arg0 = new NormalDistributionFunction2D((-9), (-9));
        
        // Set the start point to an infinite value
        Millisecond arg4 = new Millisecond();
        
        // Attempt to sample the function with a start point that is larger than the end point
        try {
        DatasetUtilities.sampleFunction2D(arg0, Double.POSITIVE_INFINITY, (-3185.18084029226), 1030, arg4);
        fail("Expecting exception: IllegalArgumentException");
        } catch (IllegalArgumentException e) {
        // Verify that the expected exception is thrown
        verifyException("org.jfree.data.general.DatasetUtilities", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testSampleFunction2DWithZero() throws Throwable  {
        // Create a new instance of NormalDistributionFunction2D with mean=-9 and standard deviation=-9
        NormalDistributionFunction2D arg0 = new NormalDistributionFunction2D((-9), (-9));
        
        // Create a new instance of Millisecond to use as the random seed
        Millisecond arg4 = new Millisecond();
        
        // Try to sample the function with samples less than 1 using DatasetUtilities.sampleFunction2D()
        try {
        DatasetUtilities.sampleFunction2D(arg0, 999, Double.POSITIVE_INFINITY, 0, arg4);
        fail("Expecting exception: IllegalArgumentException");
        } catch(IllegalArgumentException e) {
        // Verify that the correct exception is thrown
        verifyException("org.jfree.data.general.DatasetUtilities", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testSampleFunction2DWithNull() throws Throwable  {
        // Test for null 'f' argument in DatasetUtilities.sampleFunction2D() method
        TaskSeriesCollection data = new TaskSeriesCollection();
        Double minValue = (Double)DatasetUtilities.findMinimumStackedRangeValue(data);
        try {
        // Undeclared exception!
        DatasetUtilities.sampleFunction2D((Function2D) null, (-3762.8684751), (-3762.8684751), 809, minValue);
        fail("Expecting exception: IllegalArgumentException");
        } catch(IllegalArgumentException e) {
        //
        // Null 'f' argument.
        //
        verifyException("org.jfree.data.general.DatasetUtilities", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testSampleFunction2DWithNonNullAndNull() throws Throwable  {
        LineFunction2D line = new LineFunction2D(3365.19712123, 0.5);
        try {
        DatasetUtilities.sampleFunction2D(line, -1.0, 3365.19712123, 2, (Comparable) null);
        fail("Expecting exception: IllegalArgumentException");
        } catch (IllegalArgumentException e) {
        // Verify that the thrown exception is the expected one.
        verifyException("org.jfree.data.general.DatasetUtilities", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreateCategoryDatasetTaking2Arguments() throws Throwable  {
        // Create a new DefaultPieDataset instance.
        DefaultPieDataset arg0 = new DefaultPieDataset();
        
        // Consolidate the data from a PieDataset using DatasetUtilities.createConsolidatedPieDataset method and store the result in a new variable.
        PieDataset arg1 = DatasetUtilities.createConsolidatedPieDataset((PieDataset) arg0, (Comparable) "", (double) (-159), (-159));
        
        // Create a new CategoryDataset instance using the consolidated data from the previous step.
        CategoryDataset createCategoryDataset = DatasetUtilities.createCategoryDataset((Comparable) "", (KeyedValues) arg1);
        
        // Assert that the created CategoryDataset is not null.
        assertNotNull(createCategoryDataset);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreateCategoryDatasetTaking2ArgumentsWithNull() throws Throwable  {
        // Test that a null 'rowKey' argument throws an IllegalArgumentException.
        try {
        DatasetUtilities.createCategoryDataset((Comparable) null, (KeyedValues) null);
        fail("Expecting exception: IllegalArgumentException");
        } catch(IllegalArgumentException e) {
        // Verify that the expected exception was thrown.
        verifyException("org.jfree.data.general.DatasetUtilities", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreateCategoryDatasetTaking2ArgumentsThrowsIllegalArgumentException() throws Throwable  {
        // This test ensures that a NullPointerException is thrown when creating a CategoryDataset with a null rowData argument.
        MockDate arg0 = new MockDate();
        try {
        DatasetUtilities.createCategoryDataset((Comparable) arg0, (KeyedValues) null);
        fail("Expecting exception: IllegalArgumentException");
        } catch(IllegalArgumentException e) {
        // This block is executed when an IllegalArgumentException is thrown.
        verifyException("org.jfree.data.general.DatasetUtilities", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreateCategoryDatasetTaking2ComparableArraysAnd1() throws Throwable  {
        // Test that a category dataset is created correctly
        double[][] data = new double[1][1];
        Comparable<Object>[] categories = (Comparable<Object>[]) Array.newInstance(Comparable.class, 1);
        SpreadsheetDate date = new SpreadsheetDate(2893);
        Date spreadsheetDate = date.toDate();
        Month month = new Month(spreadsheetDate);
        categories[0] = (Comparable<Object>) month;
        CategoryDataset dataset = DatasetUtilities.createCategoryDataset(categories, categories, data);
        assertNotNull(dataset);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreateCategoryDatasetTaking2ComparableArraysAnd1WithNonEmptyArray() throws Throwable  {
        Comparable<Object>[] columnKeys = (Comparable<Object>[]) Array.newInstance(Comparable.class, 1);
        double[][] data = new double[1][5];
        // The number of column keys must match the number of columns in the data array.
        try {
        DatasetUtilities.createCategoryDataset(columnKeys, columnKeys, data);
        fail("Expecting exception: IllegalArgumentException");
        } catch(IllegalArgumentException e) {
        // The number of column keys does not match the number of columns in the data array.
        verifyException("org.jfree.data.general.DatasetUtilities", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreateCategoryDatasetTaking2ComparableArraysAnd1ThrowsIllegalArgumentException0() throws Throwable  {
        Millisecond millisecond = new Millisecond();
        // Create an array of Comparable objects for 'rowKeys'
        Comparable<Object>[] arg1 = (Comparable<Object>[]) Array.newInstance(Comparable.class, 2);
        arg1[0] = (Comparable<Object>) millisecond;
        arg1[1] = (Comparable<Object>) millisecond;
        // Create a double array for 'columnKeys' with six columns
        double[][] arg2 = new double[0][6];
        try {
        // Try to create a category dataset using the duplicate items in 'rowKeys'.
        DatasetUtilities.createCategoryDataset(arg1, arg1, arg2);
        fail("Expecting exception: IllegalArgumentException");
        } catch(IllegalArgumentException e) {
        // Verify that an illegal argument exception was thrown due to the duplicate items in 'rowKeys'.
        verifyException("org.jfree.data.general.DatasetUtilities", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreateCategoryDatasetTaking2ComparableArraysAnd1ThrowsIllegalArgumentException1() throws Throwable  {
        // No Comments were added
        Comparable<Object>[] arg1 = (Comparable<Object>[]) Array.newInstance(Comparable.class, 1);
        double[][] arg2 = new double[0][5];
        // Undeclared exception!
        try { 
          DatasetUtilities.createCategoryDataset(arg1, arg1, arg2);
          fail("Expecting exception: IllegalArgumentException");
        
        } catch(IllegalArgumentException e) {
           //
           // The number of row keys does not match the number of rows in the data array.
           //
           verifyException("org.jfree.data.general.DatasetUtilities", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreateCategoryDatasetTaking2ComparableArraysAnd1WithNull() throws Throwable  {
        // Undeclared exception!
        try {
        // Creating a category dataset with null 'rowKeys' argument.
        DatasetUtilities.createCategoryDataset(null, (Comparable[]) null, (double[][]) null);
        fail("Expecting exception: IllegalArgumentException");
        } catch(IllegalArgumentException e) {
        // Verifying that the correct exception is thrown.
        verifyException("org.jfree.data.general.DatasetUtilities", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreateCategoryDatasetTaking2ComparableArraysAnd1WithNullAndNull() throws Throwable  {
        Comparable<Object>[] arg0 = (Comparable<Object>[]) Array.newInstance(Comparable.class, 1);
        // Undeclared exception!
        try {
        // Given: A dataset with a single series and no data.
        DatasetUtilities.createCategoryDataset(arg0, (Comparable[]) null, (double[][]) null);
        fail("Expecting exception: IllegalArgumentException");
        } catch(IllegalArgumentException e) {
        // When: The createCategoryDataset method is called with a null 'columnKeys' argument.
        // Then: An IllegalArgumentException should be thrown.
        verifyException("org.jfree.data.general.DatasetUtilities", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreateCategoryDatasetTaking2StringsAnd1() throws Throwable  {
        // Given a dataset with two series of numbers
        Number[][] arg2 = new Number[2][7];
        
        // When the dataset is analyzed for the stacked range bounds
        CategoryDataset arg0 = DatasetUtilities.createCategoryDataset("Q", "Q", arg2);
        Range findStackedRangeBounds = DatasetUtilities.findStackedRangeBounds(arg0);
        
        // Then the method should return a range with an upper bound of 0 and a lower bound of 0
        assertEquals(0.0, findStackedRangeBounds.getUpperBound(), 0.01);
        assertNotNull(findStackedRangeBounds);
        assertEquals(0.0, findStackedRangeBounds.getLowerBound(), 0.01);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreateConsolidatedPieDatasetTaking4ArgumentsWithNegativeAndNegative() throws Throwable  {
        // Create a new pie dataset with one data point
        DefaultPieDataset arg0 = new DefaultPieDataset();
        Short arg1 = new Short((short)100);
        arg0.setValue((Comparable) "Q", (Number) arg1);
        
        // Create a consolidated pie dataset by aggregating the data from the original dataset
        PieDataset createConsolidatedPieDataset = DatasetUtilities.createConsolidatedPieDataset((PieDataset) arg0, (Comparable) "Q", (double) (-144), (-144));
        
        // Assert that the consolidated dataset is not equal to the original dataset
        assertFalse(createConsolidatedPieDataset.equals((Object)arg0));
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreatePieDatasetForColumnTaking1And1ThrowsIllegalArgumentException() throws Throwable  {
        double[][] data = new double[1][1];
        DefaultIntervalCategoryDataset dataset = new DefaultIntervalCategoryDataset(data, data);
        // Undeclared exception!
        try {
        DatasetUtilities.createPieDatasetForColumn((CategoryDataset) dataset, -876);
        fail("Expecting exception: IllegalArgumentException");
        
        } catch(IllegalArgumentException e) {
        //
        // DefaultIntervalCategoryDataset.getValue(): category index out of range.
        //
        verifyException("org.jfree.data.category.DefaultIntervalCategoryDataset", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreatePieDatasetForRowTaking1And1ThrowsIndexOutOfBoundsException() throws Throwable  {
        // Given a CategoryDataset arg0 with 3 columns and 1 row
        double[][] arg2 = new double[1][3];
        CategoryDataset arg0 = DatasetUtilities.createCategoryDataset("yPt}O^tR{GMK0a?", (String) null, arg2);
        
        // When trying to create a PieDataset for the 241th row of arg0
        try {
        DatasetUtilities.createPieDatasetForRow(arg0, 241);
        } catch(IndexOutOfBoundsException e) {
        // Then an IndexOutOfBoundsException is thrown because the index 241 is out of bounds for the dataset with size 1
        verifyException("java.util.ArrayList", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreateConsolidatedPieDatasetTaking4Arguments0() throws Throwable  {
        // No Comments were added
        DefaultPieDataset arg0 = new DefaultPieDataset();
        BigInteger arg1 = BigInteger.ONE;
        arg0.setValue((Comparable) "Q", (Number) arg1);
        PieDataset createConsolidatedPieDataset = DatasetUtilities.createConsolidatedPieDataset((PieDataset) arg0, (Comparable) "Q", (double) 4087, 4087);
        assertEquals(1, createConsolidatedPieDataset.getItemCount());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreateConsolidatedPieDatasetTaking4Arguments1() throws Throwable  {
        // Given a dataset with one item
        DefaultPieDataset arg0 = new DefaultPieDataset();
        arg0.setValue((Comparable) "Q", (Number) null);
        
        // When we consolidate the dataset with a new item
        PieDataset createConsolidatedPieDataset = DatasetUtilities.createConsolidatedPieDataset((PieDataset) arg0, (Comparable) "Q", (double) 4087, 4087);
        
        // Then the resulting dataset should have no items
        assertEquals(0, createConsolidatedPieDataset.getItemCount());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCalculatePieDatasetTotalThrowsIllegalArgumentException() throws Throwable  {
        // Undeclared exception!
        try {
        DatasetUtilities.calculatePieDatasetTotal((PieDataset) null); // Calculates the total of a pie dataset, throws IllegalArgumentException if 'dataset' is null.
        fail("Expecting exception: IllegalArgumentException");
        } catch(IllegalArgumentException e) {
        // Verifies that the exception is an instance of IllegalArgumentException.
        verifyException("org.jfree.data.general.DatasetUtilities", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFindDomainBoundsTakingXYDataset() throws Throwable  {
        // This test checks that the method DatasetUtilities.findDomainBounds returns null when
        // passed a dataset with no data.
        
        // Arrange: create a new DefaultXYZDataset object and pass it to the method as an XYDataset.
        DefaultXYZDataset arg0 = new DefaultXYZDataset();
        Range findDomainBounds = DatasetUtilities.findDomainBounds((XYDataset) arg0);
        
        // Act: call the method and store its result in a variable.
        assertNull(findDomainBounds);
        
        // Assert: verify that the method returned null as expected.
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFindStackedRangeBoundsTakingCategoryDatasetReturningNull() throws Throwable  {
        // Given a TaskSeriesCollection with no stacking
        TaskSeriesCollection series = new TaskSeriesCollection();
        
        // When findStackedRangeBounds is called on the dataset
        Range range = DatasetUtilities.findStackedRangeBounds((CategoryDataset) series);
        
        // Then the result should be null, as there is no stacking
        assertNull(range);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreateConsolidatedPieDatasetTaking3Arguments() throws Throwable  {
        // No Comments were added
        MockGregorianCalendar arg1 = new MockGregorianCalendar();
        DefaultPieDataset arg0 = new DefaultPieDataset();
        PieDataset createConsolidatedPieDataset = DatasetUtilities.createConsolidatedPieDataset((PieDataset) arg0, (Comparable) arg1, 424.0);
        assertEquals(0, createConsolidatedPieDataset.getItemCount());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFindRangeBoundsTakingCategoryDatasetReturningNull() throws Throwable  {
        // Setup
        TaskSeriesCollection taskSeriesCollection = new TaskSeriesCollection();
        
        // Execute
        Range findRangeBounds = DatasetUtilities.findRangeBounds((CategoryDataset) taskSeriesCollection);
        
        // Verify
        assertNull(findRangeBounds);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testIterateDomainBoundsTakingXYDataset() throws Throwable  {
        // Create a new SimpleHistogramDataset with null as its only argument
        SimpleHistogramDataset dataset = new SimpleHistogramDataset((Comparable) null);
        
        // Use DatasetUtilities.iterateDomainBounds() to get the bounds of the dataset's domain
        Range iterateDomainBounds = DatasetUtilities.iterateDomainBounds(dataset);
        
        // Assert that the returned range is null, as there are no valid data points in the dataset
        assertNull(iterateDomainBounds);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFindStackedRangeBoundsTakingTableXYDatasetReturningRangeWhereGetCentralValueIsZero() throws Throwable  {
        // Creates a new instance of TimeTableXYDataset with no data
        TimeTableXYDataset arg0 = new TimeTableXYDataset();
        
        // Finds the range bounds for the stacked dataset
        Range findStackedRangeBounds = DatasetUtilities.findStackedRangeBounds((TableXYDataset) arg0);
        
        // Asserts that the upper bound is equal to 0 with a tolerance of 0.01
        assertEquals(0.0, findStackedRangeBounds.getUpperBound(), 0.01);
        
        // Asserts that the lower bound is equal to 0 with a tolerance of 0.01
        assertEquals(0.0, findStackedRangeBounds.getLowerBound(), 0.01);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreatePieDatasetForColumnTaking1And1AndCreatePieDatasetForColumnTaking1And11() throws Throwable  {
        // Create a mock date object for testing
        MockDate arg1 = new MockDate((-1230), (-1230), (-1));
        
        // Create a default box and whisker category dataset
        DefaultBoxAndWhiskerCategoryDataset arg0 = new DefaultBoxAndWhiskerCategoryDataset();
        
        // Use DatasetUtilities to create a pie dataset from the column of the default box and whisker category dataset
        PieDataset createPieDatasetForColumn = DatasetUtilities.createPieDatasetForColumn((CategoryDataset) arg0, (Comparable) arg1);
        
        // Verify that the pie dataset has no items
        assertEquals(0, createPieDatasetForColumn.getItemCount());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreatePieDatasetForRowTaking1And1() throws Throwable  {
        // Given a TaskSeriesCollection arg0 containing task series data
        TaskSeriesCollection arg0 = new TaskSeriesCollection();
        
        // When the createPieDatasetForRow method is called with arg0 as the CategoryDataset and null as the Comparable
        PieDataset createPieDatasetForRow = DatasetUtilities.createPieDatasetForRow((CategoryDataset) arg0, (Comparable) null);
        
        // Then assert that the returned PieDataset has 0 items
        assertEquals(0, createPieDatasetForRow.getItemCount());
    }
  }
  