content: /*
   * This file was automatically generated by UTestGen and EvoSuite
   * Tue Mar 19 17:41:55 GMT 2024
   */
  
  package net.sf.javaml.core;
  
  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.util.Collection;
  import java.util.LinkedHashSet;
  import java.util.Map;
  import java.util.Set;
  import java.util.SortedSet;
  import net.sf.javaml.core.DenseInstance;
  import net.sf.javaml.core.Instance;
  import org.evosuite.runtime.EvoRunner;
  import org.evosuite.runtime.EvoRunnerParameters;
  import org.junit.runner.RunWith;
  
  @RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true) 
  public class DenseInstance_Original_ESTest extends DenseInstance_Original_ESTest_scaffolding {
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreatesDenseInstanceTakingDoubleArray() throws Throwable  {
        double[] arg0 = new double[7];
        arg0[0] = (-1299.39739092553);
        DenseInstance denseInstance = new DenseInstance(arg0);
        double value = denseInstance.value(0);
        assertEquals((-1299.39739092553), value, 0.01);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testSizeReturningPositive() throws Throwable  {
        DenseInstance denseInstance = new DenseInstance(31);
        int size = denseInstance.size();
        assertEquals(31, size);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testNoAttributesReturningPositive() throws Throwable  {
        double[] arg0 = new double[7];
        Integer arg1 = new Integer(0);
        DenseInstance denseInstance = new DenseInstance(arg0, arg1);
        int noAttributes = denseInstance.noAttributes();
        assertEquals(7, noAttributes);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCopyReturningInstanceWhereSizeIsPositive() throws Throwable  {
        DenseInstance denseInstance = new DenseInstance(4089);
        Instance copy = denseInstance.copy();
        assertTrue(copy.equals((Object)denseInstance));
        assertEquals(1, copy.getID());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testRemoveAttributesWithEmptySet() throws Throwable  {
        DenseInstance denseInstance = new DenseInstance(33);
        LinkedHashSet<Integer> arg0 = new LinkedHashSet<Integer>();
        denseInstance.removeAttributes(arg0);
        assertFalse(arg0.contains(33));
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testEqualsReturningTrue() throws Throwable  {
        DenseInstance denseInstance = new DenseInstance(821);
        DenseInstance arg0 = new DenseInstance(821);
        boolean equals = denseInstance.equals(arg0);
        assertTrue(equals);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testEqualsWithNonNull() throws Throwable  {
        DenseInstance denseInstance = new DenseInstance(31);
        Object arg0 = new Object();
        boolean equals = denseInstance.equals(arg0);
        assertFalse(equals);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreatesDenseInstanceTakingInt() throws Throwable  {
        DenseInstance arg0 = new DenseInstance(31);
        boolean equals = arg0.equals(arg0);
        assertTrue(equals);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testEqualsWithNull() throws Throwable  {
        DenseInstance denseInstance = new DenseInstance(31);
        boolean equals = denseInstance.equals((Object) null);
        assertFalse(equals);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testValues() throws Throwable  {
        DenseInstance denseInstance = new DenseInstance(31);
        Collection<Double> values = denseInstance.values();
        assertNotNull(values);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testKeySet() throws Throwable  {
        DenseInstance denseInstance = new DenseInstance(57);
        SortedSet<Integer> arg0 = denseInstance.keySet();
        denseInstance.removeAttributes(arg0);
        assertEquals(0, denseInstance.size());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testEntrySet() throws Throwable  {
        DenseInstance denseInstance = new DenseInstance(31);
        Set<Map.Entry<Integer, Double>> entrySet = (Set<Map.Entry<Integer, Double>>)denseInstance.entrySet();
        assertEquals(31, entrySet.size());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testContainsValue() throws Throwable  {
        DenseInstance denseInstance = new DenseInstance(2109);
        Object arg0 = new Object();
        boolean containsValue = denseInstance.containsValue(arg0);
        assertFalse(containsValue);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testContainsKeyReturningTrue() throws Throwable  {
        DenseInstance denseInstance = new DenseInstance(4089);
        Integer arg0 = new Integer(956);
        boolean containsKey = denseInstance.containsKey(arg0);
        assertTrue(containsKey);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testContainsKey() throws Throwable  {
        DenseInstance denseInstance = new DenseInstance(4089);
        Integer arg0 = new Integer(4089);
        boolean containsKey = denseInstance.containsKey(arg0);
        assertFalse(containsKey);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testContainsKeyWithNonNull() throws Throwable  {
        DenseInstance denseInstance = new DenseInstance(31);
        Object arg0 = new Object();
        boolean containsKey = denseInstance.containsKey(arg0);
        assertFalse(containsKey);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testNoAttributesReturningZero() throws Throwable  {
        DenseInstance denseInstance = new DenseInstance(0);
        int noAttributes = denseInstance.noAttributes();
        assertEquals(0, noAttributes);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetReturningZero() throws Throwable  {
        DenseInstance denseInstance = new DenseInstance(1780);
        Integer arg0 = new Integer(1);
        Double get = denseInstance.get(arg0);
        assertEquals(0.0, (double)get, 0.01);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testSizeReturningZero() throws Throwable  {
        DenseInstance denseInstance = new DenseInstance(0);
        int size = denseInstance.size();
        assertEquals(0, size);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testRemoveAttribute() throws Throwable  {
        double[] arg0 = new double[6];
        Object arg1 = new Object();
        DenseInstance denseInstance = new DenseInstance(arg0, arg1);
        denseInstance.removeAttribute(1);
        assertEquals(5, denseInstance.noAttributes());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testIsEmpty() throws Throwable  {
        DenseInstance denseInstance = new DenseInstance(31);
        boolean empty = denseInstance.isEmpty();
        assertFalse(empty);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testToString() throws Throwable  {
        DenseInstance denseInstance = new DenseInstance(111);
        String string = denseInstance.toString();
        assertEquals("{[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0];null}", string);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testHashCode() throws Throwable  {
        DenseInstance denseInstance = new DenseInstance(821);
        denseInstance.hashCode();
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCopyReturningInstanceWhereSizeIsZero() throws Throwable  {
        DenseInstance denseInstance = new DenseInstance(0);
        Instance copy = denseInstance.copy();
        assertTrue(copy.equals((Object)denseInstance));
        assertEquals(1, copy.getID());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testValueReturningZero() throws Throwable  {
        DenseInstance denseInstance = new DenseInstance(4089);
        double value = denseInstance.value(793);
        assertEquals(0.0, value, 0.01);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testClear() throws Throwable  {
        DenseInstance denseInstance = new DenseInstance(821);
        denseInstance.clear();
        assertEquals(821, denseInstance.size());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testPut() throws Throwable  {
        DenseInstance denseInstance = new DenseInstance(1780);
        Integer arg0 = new Integer(1);
        Double arg1 = new Double((-1.0));
        Double put = denseInstance.put(arg0, arg1);
        Double get = denseInstance.get(arg0);
        assertNotEquals((double)get, (double)put, 0.01);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testRemoveThrowsUnsupportedOperationException() throws Throwable  {
        DenseInstance denseInstance = new DenseInstance(821);
        Double arg0 = new Double(821);
        // Undeclared exception!
        try { 
          denseInstance.remove((Object) arg0);
          fail("Expecting exception: UnsupportedOperationException");
        
        } catch(UnsupportedOperationException e) {
           //
           // Cannot unset values from a dense instance.
           //
           verifyException("net.sf.javaml.core.DenseInstance", e);
        }
    }
  }
  