content: /*
   * This file was automatically generated by UTestGen and EvoSuite
   * Tue Mar 19 20:07:43 GMT 2024
   */
  
  package org.jfree.data.category;
  
  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.time.chrono.ChronoLocalDate;
  import java.util.List;
  import org.evosuite.runtime.EvoRunner;
  import org.evosuite.runtime.EvoRunnerParameters;
  import org.evosuite.runtime.mock.java.util.MockDate;
  import org.jfree.data.category.DefaultIntervalCategoryDataset;
  import org.jfree.data.time.Hour;
  import org.jfree.data.time.Minute;
  import org.junit.runner.RunWith;
  
  @RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true) 
  public class DefaultIntervalCategoryDataset_ESTest extends DefaultIntervalCategoryDataset_ESTest_scaffolding {
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetSeriesIndexReturningPositive() throws Throwable  {
        // Given a DefaultIntervalCategoryDataset with a valid row key
        double[][] arg1 = new double[6][8];
        DefaultIntervalCategoryDataset defaultIntervalCategoryDataset = new DefaultIntervalCategoryDataset(arg1, arg1);
        
        // When we call getSeriesIndex with the row key
        Comparable arg0 = defaultIntervalCategoryDataset.getRowKey(1);
        
        // Then we expect the method to return the index of the series that contains the row key
        int expectedSeriesIndex = 6;
        assertEquals(expectedSeriesIndex, defaultIntervalCategoryDataset.getSeriesIndex(arg0));
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetSeriesIndexReturningNegative() throws Throwable  {
        // Given a DefaultIntervalCategoryDataset with two series of different lengths
        Number[][] data = new Number[4][7];
        Minute interval = new Minute();
        DefaultIntervalCategoryDataset defaultIntervalCategoryDataset = new DefaultIntervalCategoryDataset(data, data);
        
        // When we call getSeriesIndex() with a value from the first series
        int index = defaultIntervalCategoryDataset.getSeriesIndex(interval);
        
        // Then the method should return the index of the corresponding series
        assertEquals(0, index);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetRowIndexReturningNegative() throws Throwable  {
        // No Comments were added
        Number[][] arg1 = new Number[8][7];
        DefaultIntervalCategoryDataset defaultIntervalCategoryDataset = new DefaultIntervalCategoryDataset(arg1, arg1);
        Hour arg0 = new Hour();
        defaultIntervalCategoryDataset.getRowIndex(arg0);
        assertEquals(7, defaultIntervalCategoryDataset.getItemCount());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetItemCountReturningZero() throws Throwable  {
        // Given a dataset with 1 row and 0 columns
        Number[][] arg1 = new Number[1][0];
        DefaultIntervalCategoryDataset defaultIntervalCategoryDataset = new DefaultIntervalCategoryDataset(arg1, arg1);
        
        // When the item count is retrieved
        int itemCount = defaultIntervalCategoryDataset.getItemCount();
        
        // Then the item count should be 0
        assertEquals(0, itemCount);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetRowCountReturningPositive() throws Throwable  {
        // Given a 2D array of doubles representing the data for a DefaultIntervalCategoryDataset
        double[][] arg1 = new double[7][6];
        
        // When a DefaultIntervalCategoryDataset is created with the given data
        DefaultIntervalCategoryDataset defaultIntervalCategoryDataset = new DefaultIntervalCategoryDataset(arg1, arg1);
        
        // Then the dataset should have 6 rows and 7 columns
        int rowCount = defaultIntervalCategoryDataset.getRowCount();
        assertEquals(6, defaultIntervalCategoryDataset.getItemCount());
        assertEquals(7, rowCount);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetEndValueTaking2Ints() throws Throwable  {
        // rollbacked to evosuite
        Number[][] arg1 = new Number[1][7];
        DefaultIntervalCategoryDataset defaultIntervalCategoryDataset = new DefaultIntervalCategoryDataset(arg1, arg1);
        defaultIntervalCategoryDataset.getEndValue(0, 0);
        assertEquals(7, defaultIntervalCategoryDataset.getItemCount());
        assertEquals(7, defaultIntervalCategoryDataset.getCategoryCount());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetEndValueTaking2IntsWithNegative() throws Throwable  {
        // No Comments were added
        double[][] arg1 = new double[7][6];
        DefaultIntervalCategoryDataset defaultIntervalCategoryDataset = new DefaultIntervalCategoryDataset(arg1, arg1);
        // Undeclared exception!
        try { 
          defaultIntervalCategoryDataset.getEndValue((-5), 1926);
          fail("Expecting exception: IllegalArgumentException");
        
        } catch(IllegalArgumentException e) {
           //
           // DefaultIntervalCategoryDataset.getValue(): series index out of range.
           //
           verifyException("org.jfree.data.category.DefaultIntervalCategoryDataset", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetStartValueWithNegativeAndNegative() throws Throwable  {
        // This test verifies that a DefaultIntervalCategoryDataset throws an
        // IllegalArgumentException when the series index is out of range.
        
        // Create a dataset with one series and seven items per series.
        Number[][] arg1 = new Number[1][7];
        DefaultIntervalCategoryDataset defaultIntervalCategoryDataset = new DefaultIntervalCategoryDataset(arg1, arg1);
        
        // Try to get the start value for a series index that is out of range.
        try {
        defaultIntervalCategoryDataset.getStartValue(-863, -863);
        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 testGetColumnKeysReturningListWhereIsEmptyIsTrueAndListWhereSizeIsZero() throws Throwable  {
        // Setup
        Number[][] arg1 = new Number[0][4];
        DefaultIntervalCategoryDataset defaultIntervalCategoryDataset = new DefaultIntervalCategoryDataset(arg1, arg1);
        
        // Action
        List columnKeys = defaultIntervalCategoryDataset.getColumnKeys();
        
        // Assertion
        assertEquals(0, columnKeys.size());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetColumnKeys() throws Throwable  {
        // Given a DefaultIntervalCategoryDataset with 1 row and 7 columns
        Number[][] arg1 = new Number[1][7];
        DefaultIntervalCategoryDataset defaultIntervalCategoryDataset = new DefaultIntervalCategoryDataset(arg1, arg1);
        
        // When we call getColumnKeys on the dataset
        List columnKeys = defaultIntervalCategoryDataset.getColumnKeys();
        
        // Then the result should be a list of 7 keys representing the columns
        assertEquals(7, columnKeys.size());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetSeries() throws Throwable  {
        // rollbacked to evosuite
        double[][] arg1 = new double[2][8];
        DefaultIntervalCategoryDataset defaultIntervalCategoryDataset = new DefaultIntervalCategoryDataset(arg1, arg1);
        List series = defaultIntervalCategoryDataset.getSeries();
        assertEquals(2, series.size());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetCategoryCountReturningPositive() throws Throwable  {
        // Given a DefaultIntervalCategoryDataset with 6 rows and 7 columns
        Number[][] arg1 = new Number[6][7];
        DefaultIntervalCategoryDataset defaultIntervalCategoryDataset = new DefaultIntervalCategoryDataset(arg1, arg1);
        
        // When the getItemCount method is called
        int itemCount = defaultIntervalCategoryDataset.getItemCount();
        
        // Then the number of items should be 7 (the total number of cells in the dataset)
        assertEquals(7, itemCount);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetSeriesCountReturningPositive() throws Throwable  {
        // Given the following arguments:
        Number[][] arg1 = new Number[6][7];
        DefaultIntervalCategoryDataset defaultIntervalCategoryDataset = new DefaultIntervalCategoryDataset(arg1, arg1);
        
        // When the method "getSeriesCount" is called on the dataset
        int seriesCount = defaultIntervalCategoryDataset.getSeriesCount();
        
        // Then the result should be equal to 7
        assertEquals(7, seriesCount);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetColumnIndexReturningNegative() throws Throwable  {
        // rollbacked to evosuite
        Number[][] arg1 = new Number[1][7];
        DefaultIntervalCategoryDataset defaultIntervalCategoryDataset = new DefaultIntervalCategoryDataset(arg1, arg1);
        MockDate arg0 = new MockDate();
        defaultIntervalCategoryDataset.getColumnIndex(arg0);
        assertEquals(7, defaultIntervalCategoryDataset.getItemCount());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetSeriesIndexReturningZero() throws Throwable  {
        // Given a DefaultIntervalCategoryDataset with 4 rows and 7 columns
        Number[][] arg1 = new Number[4][7];
        DefaultIntervalCategoryDataset defaultIntervalCategoryDataset = new DefaultIntervalCategoryDataset(arg1, arg1);
        
        // When the row key at index 0 is retrieved
        Comparable arg0 = defaultIntervalCategoryDataset.getRowKey(0);
        
        // Then
        // the row key should not be null
        assertNotNull(arg0);
        
        // and the row key should have the expected value ("Series 1")
        assertEquals("Series 1", arg0);
        
        // When the series index of the row key at index 0 is retrieved
        int actual = defaultIntervalCategoryDataset.getSeriesIndex(arg0);
        
        // Then
        // the series index should be equal to 4 (the number of rows)
        assertEquals(4, actual);
        
        // and the item count should be equal to 7 (the number of columns)
        assertEquals(7, defaultIntervalCategoryDataset.getItemCount());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetRowCountReturningZero() throws Throwable  {
        // Given a DefaultIntervalCategoryDataset with no rows
        Comparable<Integer>[] arg1 = (Comparable<Integer>[]) Array.newInstance(Comparable.class, 0);
        DefaultIntervalCategoryDataset defaultIntervalCategoryDataset = new DefaultIntervalCategoryDataset(arg1, arg1, (Number[][]) null, (Number[][]) null);
        
        // When the row count is retrieved
        int rowCount = defaultIntervalCategoryDataset.getRowCount();
        
        // Then the row count should be 0
        assertEquals(0, rowCount);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetColumnCountReturningPositive() throws Throwable  {
        // Given a 2D array of numbers and an instance of DefaultIntervalCategoryDataset
        Number[][] arg1 = new Number[11][9];
        DefaultIntervalCategoryDataset defaultIntervalCategoryDataset = new DefaultIntervalCategoryDataset(arg1, arg1);
        
        // When the getItemCount() method is called on the dataset
        int itemCount = defaultIntervalCategoryDataset.getItemCount();
        
        // Then the number of items in the dataset should be 9
        assertEquals(9, itemCount);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreatesDefaultIntervalCategoryDatasetTaking2ArgumentsAndCallsGetColumnCount0() throws Throwable  {
        // Given a DefaultIntervalCategoryDataset with empty data
        Number[][] data = new Number[0][1];
        DefaultIntervalCategoryDataset dataset = new DefaultIntervalCategoryDataset(data, data);
        
        // When the column count is retrieved
        int columnCount = dataset.getColumnCount();
        
        // Then the column count should be 0
        assertEquals(0, columnCount);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreatesDefaultIntervalCategoryDatasetTaking2ArgumentsAndCallsGetColumnCount1() throws Throwable  {
        // Arrange
        DefaultIntervalCategoryDataset dataset = new DefaultIntervalCategoryDataset((Number[][]) null, (Number[][]) null);
        
        // Act
        int columnCount = dataset.getColumnCount();
        
        // Assert
        assertEquals(0, columnCount);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetRowKeyThrowsIllegalArgumentException() throws Throwable  {
        // Given a DefaultIntervalCategoryDataset with 6 rows and 7 columns
        Number[][] data = new Number[6][7];
        DefaultIntervalCategoryDataset dataset = new DefaultIntervalCategoryDataset(data, data);
        
        // When trying to get the row key at index 6
        try {
        dataset.getRowKey(6);
        fail("Expecting exception: IllegalArgumentException");
        } catch (IllegalArgumentException e) {
        // Then an IllegalArgumentException is thrown because the 'row' argument is out of bounds
        assertEquals("The row index (6) is not within the range of 0-5", e.getMessage());}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetRowKeysReturningListWhereIsEmptyIsTrueAndListWhereSizeIsZero() throws Throwable  {
        // No Comments were added
        DefaultIntervalCategoryDataset defaultIntervalCategoryDataset = new DefaultIntervalCategoryDataset((Number[][]) null, (Number[][]) null);
        List rowKeys = defaultIntervalCategoryDataset.getRowKeys();
        assertEquals(0, rowKeys.size());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetRowKeys() throws Throwable  {
        // Create a dataset with 5 rows and 6 columns
        double[][] data = new double[5][6];
        DefaultIntervalCategoryDataset defaultIntervalCategoryDataset = new DefaultIntervalCategoryDataset(data, data);
        
        // Assert that the number of row keys is equal to 5
        List<Comparable<?>> rowKeys = defaultIntervalCategoryDataset.getRowKeys();
        assertEquals(5, rowKeys.size());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetEndValueTaking2IntsWithPositive() throws Throwable  {
        double[][] data = new double[3][3];
        DefaultIntervalCategoryDataset dataset = new DefaultIntervalCategoryDataset(data, data);
        
        // Given a DefaultIntervalCategoryDataset with 3 categories and 3 intervals each
        assertEquals(3, dataset.getRowCount());
        assertEquals(3, dataset.getColumnCount());
        
        try {
        // When trying to get the end value of an interval that is out of range
        dataset.getEndValue(0, 244);
        fail("Expecting exception: IllegalArgumentException");
        } catch (IllegalArgumentException e) {
        // Then an IllegalArgumentException should be thrown with the following message:
        assertEquals("Category index out of range.", e.getMessage());}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetEndValueTaking2IntsWithPositiveAndNegative() throws Throwable  {
        // No Comments were added
        Number[][] arg1 = new Number[3][7];
        DefaultIntervalCategoryDataset defaultIntervalCategoryDataset = new DefaultIntervalCategoryDataset(arg1, arg1);
        // Undeclared exception!
        try { 
          defaultIntervalCategoryDataset.getEndValue(1, (-40));
          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 testGetEndValueTaking2IntsWithZero() throws Throwable  {
        // Create an empty DefaultIntervalCategoryDataset instance.
        DefaultIntervalCategoryDataset dataset = new DefaultIntervalCategoryDataset((Number[][]) null, (Number[][]) null);
        
        // Call the getEndValue method with an invalid series index.
        try {
        dataset.getEndValue(0, 0);
        fail("Expected exception not thrown");
        } catch (IllegalArgumentException e) {
        // Verify that the correct exception is thrown.
        assertEquals("org.jfree.data.category.DefaultIntervalCategoryDataset", e.getClass().getName());
        assertTrue(e.getMessage().contains("series index out of range"));}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetStartValueThrowsIllegalArgumentException0() throws Throwable  {
        Number[][] arg1 = new Number[9][7];
        DefaultIntervalCategoryDataset defaultIntervalCategoryDataset = new DefaultIntervalCategoryDataset(arg1, arg1);
        // Undeclared exception!
        try {
        defaultIntervalCategoryDataset.getStartValue(7, 7);
        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 testGetStartValue() throws Throwable  {
        // Given an array of numbers with seven elements
        Number[][] arg1 = new Number[1][7];
        
        // When we create a DefaultIntervalCategoryDataset instance using this array
        DefaultIntervalCategoryDataset defaultIntervalCategoryDataset = new DefaultIntervalCategoryDataset(arg1, arg1);
        
        // Then the start value of the first item should be equal to seven
        assertEquals(7, defaultIntervalCategoryDataset.getStartValue(0, 0));
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetStartValueWithNegativeAndPositive() throws Throwable  {
        Number[][] values = new Number[10][7];
        DefaultIntervalCategoryDataset dataset = new DefaultIntervalCategoryDataset(values, values);
        // Undeclared exception!
        try {
        dataset.getStartValue(-1, 3643);
        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 testGetStartValueThrowsIllegalArgumentException1() throws Throwable  {
        // Create a 1x7 array of numbers as input for the DefaultIntervalCategoryDataset.
        Number[][] arg1 = new Number[1][7];
        DefaultIntervalCategoryDataset defaultIntervalCategoryDataset = new DefaultIntervalCategoryDataset(arg1, arg1);
        
        // Try to get the start value for a series index that is out of range.
        try {
        defaultIntervalCategoryDataset.getStartValue(496, 496);
        fail("Expecting exception: IllegalArgumentException");
        } catch (IllegalArgumentException e) {
        // Verify that the expected exception is thrown.
        verifyException("org.jfree.data.category.DefaultIntervalCategoryDataset", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreatesDefaultIntervalCategoryDatasetTaking2ArgumentsAndSetCategoryKeysThrowsIllegalArgumentException() throws Throwable  {
        String[] arg0 = new String[2];
        double[][] arg1 = new double[2][3];
        DefaultIntervalCategoryDataset defaultIntervalCategoryDataset = new DefaultIntervalCategoryDataset(arg1, arg1);
        // Undeclared exception!
        try {
        // Attempt to set the category keys with an incorrect number of categories.
        defaultIntervalCategoryDataset.setCategoryKeys(arg0);
        fail("Expecting exception: IllegalArgumentException");
        
        } catch(IllegalArgumentException e) {
        // Verify that the correct exception was thrown.
        verifyException("org.jfree.data.category.DefaultIntervalCategoryDataset", e);
        
        // Check that the error message is meaningful.
        assertTrue(e.getMessage().contains("The number of categories does not match the data"));}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testSetCategoryKeysWithNull() throws Throwable  {
        // Given a DefaultIntervalCategoryDataset with 6 rows and 7 columns
        Number[][] arg3 = new Number[6][7];
        DefaultIntervalCategoryDataset defaultIntervalCategoryDataset = new DefaultIntervalCategoryDataset(null, null, arg3, arg3);
        
        // When trying to set the category keys to null
        try {
        defaultIntervalCategoryDataset.setCategoryKeys((Comparable[]) null);
        fail("Expecting exception: IllegalArgumentException");
        } catch (IllegalArgumentException e) {
        // Then an exception is thrown with the appropriate message
        assertEquals("Null 'categoryKeys' argument.", e.getMessage());}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testSetCategoryKeysThrowsIllegalArgumentException() throws Throwable  {
        // No Comments were added
        Number[][] arg1 = new Number[5][7];
        DefaultIntervalCategoryDataset defaultIntervalCategoryDataset = new DefaultIntervalCategoryDataset(arg1, arg1);
        Comparable<Integer>[] arg0 = (Comparable<Integer>[]) Array.newInstance(Comparable.class, 7);
        // Undeclared exception!
        try { 
          defaultIntervalCategoryDataset.setCategoryKeys(arg0);
          fail("Expecting exception: IllegalArgumentException");
        
        } catch(IllegalArgumentException e) {
           //
           // DefaultIntervalCategoryDataset.setCategoryKeys(): null category not permitted.
           //
           verifyException("org.jfree.data.category.DefaultIntervalCategoryDataset", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetCategories() throws Throwable  {
        // Given the DefaultIntervalCategoryDataset is created with null arrays for both rows and columns
        DefaultIntervalCategoryDataset defaultIntervalCategoryDataset = new DefaultIntervalCategoryDataset((Number[][]) null, (Number[][]) null);
        
        // When the categories are retrieved from the dataset
        List categories = defaultIntervalCategoryDataset.getCategories();
        
        // Then the list of categories should be empty
        assertTrue(categories.isEmpty());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetSeriesReturningListWhereIsEmptyIsTrueAndListWhereSizeIsZero() throws Throwable  {
        // rollbacked to evosuite
        Number[][] arg1 = new Number[0][4];
        DefaultIntervalCategoryDataset defaultIntervalCategoryDataset = new DefaultIntervalCategoryDataset(arg1, arg1);
        List series = defaultIntervalCategoryDataset.getSeries();
        assertTrue(series.isEmpty());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreatesDefaultIntervalCategoryDatasetTaking2ArgumentsAndCallsGetCategoryCount0() throws Throwable  {
        // Given a DefaultIntervalCategoryDataset with no data
        DefaultIntervalCategoryDataset defaultIntervalCategoryDataset = new DefaultIntervalCategoryDataset((Number[][]) null, (Number[][]) null);
        
        // When the getCategoryCount method is called on the dataset
        int categoryCount = defaultIntervalCategoryDataset.getCategoryCount();
        
        // Then the returned value should be 0, as there are no categories in the dataset
        assertEquals(0, categoryCount);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testSetSeriesKeys() throws Throwable  {
        // rollbacked to evosuite
        String[] arg0 = new String[2];
        double[][] arg1 = new double[2][3];
        DefaultIntervalCategoryDataset defaultIntervalCategoryDataset = new DefaultIntervalCategoryDataset(arg1, arg1);
        assertEquals(2, defaultIntervalCategoryDataset.getSeriesCount());
        
        defaultIntervalCategoryDataset.setSeriesKeys(arg0);
        defaultIntervalCategoryDataset.getSeriesKey(0);
        assertEquals(3, defaultIntervalCategoryDataset.getItemCount());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testSetSeriesKeysWithNull() throws Throwable  {
        // Given
        Number[][] data = new Number[15][7];
        DefaultIntervalCategoryDataset dataset = new DefaultIntervalCategoryDataset(data, data);
        
        // When
        try {
        dataset.setSeriesKeys((Comparable[]) null);
        fail("Expecting exception: IllegalArgumentException");
        } catch (IllegalArgumentException e) {
        // Then
        verifyException("org.jfree.data.category.DefaultIntervalCategoryDataset", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testSetSeriesKeysWithEmptyArray() throws Throwable  {
        Number[][] data = new Number[1][7];
        DefaultIntervalCategoryDataset dataset = new DefaultIntervalCategoryDataset(data, data);
        
        // create an array of empty Comparable objects with a length that does not match the number of series in the dataset
        Comparable<Object>[] keys = (Comparable<Object>[]) Array.newInstance(Comparable.class, 0);
        
        try {
        dataset.setSeriesKeys(keys);
        fail("Expected IllegalArgumentException");
        } catch (IllegalArgumentException e) {
        // this is the expected exception
        assertTrue(e.getMessage().contains("the number of series keys does not match the data"));}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetSeriesKeyWithNegative() throws Throwable  {
        // Given a DefaultIntervalCategoryDataset with 5 rows and 8 columns
        double[][] arg1 = new double[5][8];
        DefaultIntervalCategoryDataset defaultIntervalCategoryDataset = new DefaultIntervalCategoryDataset(arg1, arg1);
        
        // When trying to get the series key for an invalid index (-2402)
        try {
        defaultIntervalCategoryDataset.getSeriesKey(-2402);
        fail("Expecting exception: IllegalArgumentException");
        } catch(IllegalArgumentException e) {
        // Then a IllegalArgumentException is thrown with the message "No such series : -2402"
        assertEquals("No such series : -2402", e.getMessage());}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetSeriesKeyReturningNonNull() throws Throwable  {
        // Given a DefaultIntervalCategoryDataset object with two series and three items per series
        double[][] arg1 = new double[2][3];
        DefaultIntervalCategoryDataset defaultIntervalCategoryDataset = new DefaultIntervalCategoryDataset(arg1, arg1);
        
        // When the series count is queried
        Comparable seriesKey = defaultIntervalCategoryDataset.getSeriesKey(0);
        
        // Then the result should be 2 (the number of series)
        assertEquals(2, defaultIntervalCategoryDataset.getSeriesCount());
        
        // And the series key for the first series should be "Series 1"
        assertEquals("Series 1", seriesKey);
        
        // And the item count for the first series should be 3 (the number of items)
        assertEquals(3, defaultIntervalCategoryDataset.getItemCount());
        
        // And the series key should not be null
        assertNotNull(seriesKey);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetSeriesKeyWithPositive() throws Throwable  {
        // rollbacked to evosuite
        Number[][] arg1 = new Number[8][7];
        DefaultIntervalCategoryDataset defaultIntervalCategoryDataset = new DefaultIntervalCategoryDataset(arg1, arg1);
        // Undeclared exception!
        try { 
          defaultIntervalCategoryDataset.getSeriesKey(734);
          fail("Expecting exception: IllegalArgumentException");
        
        } catch(IllegalArgumentException e) {
           //
           // No such series : 734
           //
           verifyException("org.jfree.data.category.DefaultIntervalCategoryDataset", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFailsToCreateDefaultIntervalCategoryDatasetTaking4ArgumentsThrowsIllegalArgumentException0() throws Throwable  {
        // Set up some sample data for testing
        Number[][] arg3 = new Number[6][7];
        Comparable<Integer>[] arg1 = (Comparable<Integer>[]) Array.newInstance(Comparable.class, 6);
        
        // Create a DefaultIntervalCategoryDataset with invalid arguments
        try {
        DefaultIntervalCategoryDataset dataset = new DefaultIntervalCategoryDataset(arg1, arg1, arg3, arg3);
        fail("Expecting exception: IllegalArgumentException");
        } catch (IllegalArgumentException e) {
        // Verify that the exception was thrown as expected
        assertEquals("Number of category keys does not match number of categories in the data", e.getMessage());}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFailsToCreateDefaultIntervalCategoryDatasetTaking2ArgumentsThrowsIllegalArgumentException0() throws Throwable  {
        // Given: we have two arrays of numbers, one with 7 values and the other with 6 values, and we want to create a DefaultIntervalCategoryDataset from them.
        Number[][] arg0 = new Number[1][7];
        Number[][] arg1 = new Number[1][6];
        
        // When: we try to create a DefaultIntervalCategoryDataset using these arrays as arguments.
        DefaultIntervalCategoryDataset defaultIntervalCategoryDataset = null;
        try {
        defaultIntervalCategoryDataset = new DefaultIntervalCategoryDataset(arg0, arg1);
        fail("Expecting exception: IllegalArgumentException");
        } catch(IllegalArgumentException e) {
        // Then: we expect an IllegalArgumentException to be thrown because the number of categories in the start value dataset does not match the number of categories in the end value dataset.
        verifyException("org.jfree.data.category.DefaultIntervalCategoryDataset", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFailsToCreateDefaultIntervalCategoryDatasetTaking4ArgumentsThrowsIllegalArgumentException1() throws Throwable  {
        // Given a DefaultIntervalCategoryDataset with null series keys
        Comparable<ChronoLocalDate>[] arg1 = (Comparable<ChronoLocalDate>[]) Array.newInstance(Comparable.class, 0);
        Number[][] arg3 = new Number[9][7];
        DefaultIntervalCategoryDataset defaultIntervalCategoryDataset = null;
        
        // When a DefaultIntervalCategoryDataset is created with the given series keys and data
        try {
        defaultIntervalCategoryDataset = new DefaultIntervalCategoryDataset(arg1, arg1, arg3, arg3);
        } catch (IllegalArgumentException e) {
        // Then an IllegalArgumentException should be thrown because the number of series keys does not match the number of series in the data
        verifyException("org.jfree.data.category.DefaultIntervalCategoryDataset", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreatesDefaultIntervalCategoryDatasetTaking2ArgumentsAndCallsGetCategoryCount1() throws Throwable  {
        // No Comments were added
        Number[][] arg1 = new Number[0][1];
        DefaultIntervalCategoryDataset defaultIntervalCategoryDataset = new DefaultIntervalCategoryDataset(arg1, arg1);
        int categoryCount = defaultIntervalCategoryDataset.getCategoryCount();
        assertEquals(0, defaultIntervalCategoryDataset.getSeriesCount());
        assertEquals(0, categoryCount);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFailsToCreateDefaultIntervalCategoryDatasetTaking2ArgumentsThrowsIllegalArgumentException1() throws Throwable  {
        // Given a DefaultIntervalCategoryDataset with 1 series and 7 items in the start value dataset
        // and a DefaultIntervalCategoryDataset with 0 series and 6 items in the end value dataset
        Number[][] arg0 = new Number[1][7];
        Number[][] arg1 = new Number[0][6];
        
        // When a DefaultIntervalCategoryDataset is created with these arguments
        DefaultIntervalCategoryDataset defaultIntervalCategoryDataset;
        try {
        defaultIntervalCategoryDataset = new DefaultIntervalCategoryDataset(arg0, arg1);
        fail("Expecting exception: IllegalArgumentException");
        } catch (IllegalArgumentException e) {
        // Then the constructor should throw an IllegalArgumentException with message "the number of series in the start value dataset does not match the number of series in the end value dataset"
        verifyException("org.jfree.data.category.DefaultIntervalCategoryDataset", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreatesDefaultIntervalCategoryDatasetTaking2ArgumentsAndCreatesDefaultIntervalCategoryDatasetTaking2Arguments() throws Throwable  {
        // Arrange
        Number[][] data = new Number[7][7];
        DefaultIntervalCategoryDataset dataset = new DefaultIntervalCategoryDataset(data, (Number[][]) null);
        
        // Act
        int actual = dataset.getCategoryCount();
        
        // Assert
        assertEquals(7, actual);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetSeriesCountReturningZero() throws Throwable  {
        DefaultIntervalCategoryDataset dataset = new DefaultIntervalCategoryDataset((Number[][]) null, (Number[][]) null);
        int expectedSeriesCount = 0;
        assertEquals(expectedSeriesCount, dataset.getSeriesCount());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetRowKeyWithNegative() throws Throwable  {
        // Initialize a 7x6 DefaultIntervalCategoryDataset with some data
        double[][] arg1 = new double[7][6];
        DefaultIntervalCategoryDataset dataset = new DefaultIntervalCategoryDataset(arg1, arg1);
        
        // Verify that an exception is thrown when the 'row' argument is out of bounds
        try {
        dataset.getRowKey(-137);
        fail("Expected an IllegalArgumentException to be thrown");
        } catch (IllegalArgumentException e) {
        assertTrue(e.getMessage().contains("out of bounds"));}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetColumnKey() throws Throwable  {
        // rollbacked to evosuite
        Number[][] arg1 = new Number[6][7];
        DefaultIntervalCategoryDataset defaultIntervalCategoryDataset = new DefaultIntervalCategoryDataset(arg1, arg1);
        Comparable arg0 = defaultIntervalCategoryDataset.getColumnKey(6);
        assertEquals("Category 7", arg0);
        
        int columnIndex = defaultIntervalCategoryDataset.getColumnIndex(arg0);
        assertEquals(7, defaultIntervalCategoryDataset.getItemCount());
        assertEquals(6, columnIndex);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetItemCountReturningPositive() throws Throwable  {
        // Given a dataset of 17 rows and 7 columns
        Number[][] arg1 = new Number[17][7];
        
        // When the DefaultIntervalCategoryDataset is created with the dataset
        DefaultIntervalCategoryDataset defaultIntervalCategoryDataset = new DefaultIntervalCategoryDataset(arg1, arg1);
        
        // Then the item count of the dataset should be 7
        int itemCount = defaultIntervalCategoryDataset.getItemCount();
        assertEquals(7, itemCount);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetRowIndexReturningZero() throws Throwable  {
        // Arrange
        Number[][] arg1 = new Number[1][7];
        DefaultIntervalCategoryDataset defaultIntervalCategoryDataset = new DefaultIntervalCategoryDataset(arg1, arg1);
        
        // Act
        Comparable arg0 = defaultIntervalCategoryDataset.getRowKey(0);
        
        // Assert
        assertNotNull(arg0);
        assertEquals("Series 1", arg0);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetValueTaking2Comparables() throws Throwable  {
        // rollbacked to evosuite
        Number[][] arg3 = new Number[7][7];
        Comparable<Object>[] arg1 = (Comparable<Object>[]) Array.newInstance(Comparable.class, 7);
        DefaultIntervalCategoryDataset defaultIntervalCategoryDataset = new DefaultIntervalCategoryDataset(arg1, arg1, arg3, arg3);
        defaultIntervalCategoryDataset.getValue(arg1[0], arg1[5]);
        assertEquals(7, defaultIntervalCategoryDataset.getCategoryCount());
        assertEquals(7, defaultIntervalCategoryDataset.getSeriesCount());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreatesDefaultIntervalCategoryDatasetTaking3Arguments() throws Throwable  {
        // Given a DefaultIntervalCategoryDataset instance with 1 row and 7 columns
        Number[][] arg2 = new Number[1][7];
        DefaultIntervalCategoryDataset dataset = new DefaultIntervalCategoryDataset(null, arg2, arg2);
        
        // When we call the getItemCount method
        int itemCount = dataset.getItemCount();
        
        // Then the item count should be 7
        assertEquals(7, itemCount);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetEndValueTaking2ComparablesThrowsIllegalArgumentException() throws Throwable  {
        // Create a 6x7 array of numbers for the dataset.
        Number[][] arg1 = new Number[6][7];
        
        // Create a DefaultIntervalCategoryDataset with the given dataset.
        DefaultIntervalCategoryDataset defaultIntervalCategoryDataset = new DefaultIntervalCategoryDataset(arg1, arg1);
        
        // Attempt to retrieve the end value for a series index that is out of range.
        try {
        defaultIntervalCategoryDataset.getEndValue((Comparable) null, (Comparable) null);
        fail("Expecting exception: IllegalArgumentException");
        
        } catch(IllegalArgumentException e) {
        // Verify that the expected exception is thrown.
        verifyException("org.jfree.data.category.DefaultIntervalCategoryDataset", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetValueTaking2Ints() throws Throwable  {
        // rollbacked to evosuite
        Number[][] arg1 = new Number[6][7];
        DefaultIntervalCategoryDataset defaultIntervalCategoryDataset = new DefaultIntervalCategoryDataset(arg1, arg1);
        defaultIntervalCategoryDataset.getValue(1, 1);
        assertEquals(7, defaultIntervalCategoryDataset.getCategoryCount());
        assertEquals(7, defaultIntervalCategoryDataset.getItemCount());
        assertEquals(6, defaultIntervalCategoryDataset.getSeriesCount());
    }
  }
  