content: /*
   * This file was automatically generated by UTestGen and EvoSuite
   * Thu Mar 21 06:13:12 GMT 2024
   */
  
  package bcry;
  
  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 bcry.battlecryGUI;
  import java.awt.HeadlessException;
  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 battlecryGUI_ESTest extends battlecryGUI_ESTest_scaffolding {
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testMainThrowsHeadlessException() throws Throwable  {
        // Test that the program throws an expected HeadlessException when running without a graphical environment
        try {
        // Call the main method of the battlecryGUI class, passing null as the arguments
        battlecryGUI.main((String[]) null);
        
        // Assert that an exception is thrown and verify its type
        fail("Expecting exception: HeadlessException");
        } catch(HeadlessException e) {
        // Verify that the expected exception was thrown by checking its type
        assertEquals(e.getClass(), HeadlessException.class);
        
        // Check if the exception has a non-null message
        String message = e.getMessage();
        assertNotNull(message);}
    }
  }
  