content: /*
   * This file was automatically generated by UTestGen and EvoSuite
   * Mon Mar 18 03:03:42 GMT 2024
   */
  
  package corina.formats;
  
  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 corina.Range;
  import corina.Sample;
  import corina.Year;
  import corina.formats.TucsonSimple;
  import java.io.BufferedReader;
  import java.io.BufferedWriter;
  import java.io.IOException;
  import java.util.HashMap;
  import java.util.Map;
  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 TucsonSimple_ESTest extends TucsonSimple_ESTest_scaffolding {
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testSaveDataThrowsNullPointerException() throws Throwable  {
        // Given a sample with a start date
        Sample arg0 = new Sample();
        Year start = arg0.getStart();
        
        // When the saveData method is called with null as the writer argument
        try {
        TucsonSimple tucsonSimple = new TucsonSimple();
        Year arg1 = start.cropToCentury();
        Range range = new Range(arg1, arg1);
        arg0.range = range;
        tucsonSimple.saveData(arg0, (BufferedWriter) null);
        
        // Then an exception is thrown with the message "NullPointerException"
        fail("Expecting exception: NullPointerException");
        } catch (NullPointerException e) {
        // Verify that the exception is of type NullPointerException and has no message
        verifyException("corina.formats.TucsonSimple", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testSaveDataWithSampleWhereComputeRadiusIsZero() throws Throwable  {
        // rollbacked to evosuite
        TucsonSimple tucsonSimple = new TucsonSimple();
        Sample arg0 = new Sample();
        HashMap<String, Object> hashMap = new HashMap<String, Object>();
        hashMap.put("id", "id");
        arg0.meta = (Map) hashMap;
        // Undeclared exception!
        try { 
          tucsonSimple.saveData(arg0, (BufferedWriter) null);
          fail("Expecting exception: NullPointerException");
        
        } catch(NullPointerException e) {
           //
           // no message in exception (getMessage() returned null)
           //
           verifyException("corina.formats.TucsonSimple", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testToString() throws Throwable  {
        // Create a new instance of TucsonSimple
        TucsonSimple tucsonSimple = new TucsonSimple();
        
        // Call the toString method on the TucsonSimple object
        String string = tucsonSimple.toString();
        
        // Assert that the resulting string is equal to "Tucson (without header)"
        assertEquals("Tucson (without header)", string);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testLoadThrowsIOException() throws Throwable  {
        TucsonSimple tucsonSimple = new TucsonSimple();
        try {
        // Given: A BufferedReader is provided as null
        BufferedReader reader = null;
        // When: The load method is called with the null BufferedReader
        tucsonSimple.load(reader);
        // Then: An IOException should be thrown
        fail("Expecting exception: IOException");
        } catch (IOException e) {
        // no message in exception (getMessage() returned null)
        verifyException("corina.formats.TucsonSimple", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetDefaultExtension() throws Throwable  {
        // No Comments were added
        TucsonSimple tucsonSimple = new TucsonSimple();
        String defaultExtension = tucsonSimple.getDefaultExtension();
        assertEquals(".RWL", defaultExtension);
    }
  }
  