content: /*
   * This file was automatically generated by UTestGen and EvoSuite
   * Sun Mar 17 20:48:09 GMT 2024
   */
  
  package com.eteks.sweethome3d;
  
  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 com.eteks.sweethome3d.SweetHome3D;
  import com.eteks.sweethome3d.model.Home;
  import com.eteks.sweethome3d.model.HomeRecorder;
  import java.awt.HeadlessException;
  import javax.swing.JFrame;
  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 SweetHome3D_ESTest extends SweetHome3D_ESTest_scaffolding {
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testInitThrowsHeadlessException() throws Throwable  {
        SweetHome3D sweetHome3D = new SweetHome3D();
        try {
        sweetHome3D.init((String[]) null);
        fail("Expecting exception: HeadlessException");
        } catch(HeadlessException e) {
        // Verify that the exception is an instance of HeadlessException
        assertTrue(e instanceof HeadlessException);
        
        // Verify that the exception has no message (getMessage() returned null)
        assertNull(e.getMessage());}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetContentManagerThrowsIllegalArgumentException() throws Throwable  {
        // rollbacked to evosuite
        SweetHome3D sweetHome3D = new SweetHome3D();
        // Undeclared exception!
        try { 
          sweetHome3D.getContentManager();
          fail("Expecting exception: IllegalArgumentException");
        
        } catch(IllegalArgumentException e) {
           //
           // Unknown resource /com/eteks/sweethome3d/io/resources/bed140x190.obj
           //
           verifyException("com.eteks.sweethome3d.tools.ResourceURLContent", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetVersionThrowsIllegalArgumentException() throws Throwable  {
        SweetHome3D sweetHome3D = new SweetHome3D();
        // Given a SweetHome3D instance
        
        try {
        // When we call getVersion() on the SweetHome3D instance
        sweetHome3D.getVersion();
        
        // Then an IllegalArgumentException is thrown
        fail("Expecting exception: IllegalArgumentException");
        } catch(IllegalArgumentException e) {
        // Verify that the correct exception is thrown
        verifyException("com.eteks.sweethome3d.tools.ResourceURLContent", e);
        
        // And verify that the correct message is included in the exception
        assertEquals("Unknown resource /com/eteks/sweethome3d/io/resources/bed140x190.obj", e.getMessage());}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetUserPreferencesThrowsIllegalArgumentException() throws Throwable  {
        // rollbacked to evosuite
        SweetHome3D sweetHome3D = new SweetHome3D();
        // Undeclared exception!
        try { 
          sweetHome3D.getUserPreferences();
          fail("Expecting exception: IllegalArgumentException");
        
        } catch(IllegalArgumentException e) {
           //
           // Unknown resource /com/eteks/sweethome3d/io/resources/bed140x190.obj
           //
           verifyException("com.eteks.sweethome3d.tools.ResourceURLContent", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testStartThrowsIllegalArgumentException() throws Throwable  {
        SweetHome3D sweetHome3D = new SweetHome3D();
        String[] arg0 = new String[2];
        arg0[0] = "-open";
        arg0[1] = ""; // Empty file path
        
        // Given: The user is trying to open a file with an invalid file path
        // When: The user clicks on the "Open" button
        try {
        sweetHome3D.start(arg0);
        fail("Expecting exception: IllegalArgumentException");
        } catch (IllegalArgumentException e) {
        // Then: The application should throw an exception with a meaningful message
        assertEquals("Unknown resource /com/eteks/sweethome3d/io/resources/bed140x190.obj", e.getMessage());}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testStartWithNonEmptyArray() throws Throwable  {
        // Given: A SweetHome3D object and an array of string arguments
        SweetHome3D sweetHome3D = new SweetHome3D();
        String[] arg0 = new String[2];
        arg0[0] = "a small, modern house in Los Angeles";
        
        // When: The start method is called with the array of string arguments
        try {
        sweetHome3D.start(arg0);
        } catch (IllegalArgumentException e) {
        // Then: An exception is thrown due to an invalid argument
        assertEquals("Unknown resource /com/eteks/sweethome3d/io/resources/bed140x190.obj", e.getMessage());
        throw e;}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetPluginManagerThrowsIllegalArgumentException() throws Throwable  {
        SweetHome3D sweetHome3D = new SweetHome3D();
        try {
        // Given: A newly created SweetHome3D instance with no arguments
        
        // When: Calling getPluginManager method without any arguments
        sweetHome3D.getPluginManager();
        
        // Then: An IllegalArgumentException is thrown
        fail("Expecting exception: IllegalArgumentException");
        } catch (IllegalArgumentException e) {
        // Verify that the correct exception is thrown
        verifyException("com.eteks.sweethome3d.tools.ResourceURLContent", e);
        
        // And: The error message contains the details of the unknown resource
        assertTrue(e.getMessage().contains("Unknown resource /com/eteks/sweethome3d/io/resources/bed140x190.obj"));}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetHomeRecorder() throws Throwable  {
        // Given: SweetHome3D has been created and a HomeRecorder instance is needed
        SweetHome3D sweetHome3D = new SweetHome3D();
        
        // When: A HomeRecorder instance is requested with the default type argument
        HomeRecorder.Type arg0 = HomeRecorder.Type.DEFAULT;
        HomeRecorder homeRecorder = sweetHome3D.getHomeRecorder(arg0);
        
        // Then: The returned value should not be null
        assertNotNull(homeRecorder);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetNameThrowsIllegalArgumentException() throws Throwable  {
        // rollbacked to evosuite
        SweetHome3D sweetHome3D = new SweetHome3D();
        // Undeclared exception!
        try { 
          sweetHome3D.getName();
          fail("Expecting exception: IllegalArgumentException");
        
        } catch(IllegalArgumentException e) {
           //
           // Unknown resource /com/eteks/sweethome3d/io/resources/bed140x190.obj
           //
           verifyException("com.eteks.sweethome3d.tools.ResourceURLContent", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetHomeFrame() throws Throwable  {
        // Given: A SweetHome3D instance and a null argument for the home parameter
        SweetHome3D sweetHome3D = new SweetHome3D();
        Home home = null;
        
        // When: The getHomeFrame method is called with the null argument
        JFrame homeFrame = sweetHome3D.getHomeFrame(home);
        
        // Then: The returned value should be null
        assertNull(homeFrame);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testMainThrowsHeadlessException() throws Throwable  {
        // Given
        String[] arg0 = new String[1];
        
        // When
        try {
        SweetHome3D.main(arg0);
        fail("Expecting exception: HeadlessException");
        } catch (HeadlessException e) {
        // Then
        verifyException("java.awt.GraphicsEnvironment", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreateHomeFrameControllerThrowsIllegalArgumentException() throws Throwable  {
        SweetHome3D sweetHome3D = new SweetHome3D();
        // Try to create a HomeFrameController with a null Home argument
        try {
        sweetHome3D.createHomeFrameController((Home) null);
        // If no exception is thrown, fail the test
        fail("Expecting exception: IllegalArgumentException");
        } catch(IllegalArgumentException e) {
        // If an exception is thrown, verify that it is an instance of IllegalArgumentException
        verifyException("com.eteks.sweethome3d.tools.ResourceURLContent", e);}
    }
  }
  