content: /*
   * This file was automatically generated by UTestGen and EvoSuite
   * Mon Mar 18 06:06:51 GMT 2024
   */
  
  package com.lts.event;
  
  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.lts.event.SimpleKeyListenerAdapter;
  import com.lts.event.SimpleKeyListenerHelper;
  import javax.swing.JLayeredPane;
  import javax.swing.JOptionPane;
  import javax.swing.JTabbedPane;
  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 SimpleKeyListenerHelper_ESTest extends SimpleKeyListenerHelper_ESTest_scaffolding {
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testNotifyListenerWithNonNull0() throws Throwable  {
        // Create a new JOptionPane instance
        JOptionPane optionPane = new JOptionPane();
        
        // Create a new SimpleKeyListenerHelper instance with the JOptionPane as its argument
        SimpleKeyListenerHelper simpleKeyListenerHelper = new SimpleKeyListenerHelper(optionPane);
        
        // Create a new SimpleKeyListenerAdapter instance
        SimpleKeyListenerAdapter adapter = new SimpleKeyListenerAdapter();
        
        // Notify the listener with the key code 155 and the SimpleKeyListenerAdapter instance as its argument
        simpleKeyListenerHelper.notifyListener(adapter, 155, adapter);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testNotifyListenerWithNonNull1() throws Throwable  {
        // Create a new JOptionPane instance and a SimpleKeyListenerHelper object
        JOptionPane optionPane = new JOptionPane((Object) null);
        SimpleKeyListenerHelper simpleKeyListenerHelper = new SimpleKeyListenerHelper(optionPane);
        
        // Create a new SimpleKeyListenerAdapter object to act as a listener
        SimpleKeyListenerAdapter adapter = new SimpleKeyListenerAdapter();
        
        // Call the notifyListener method on the SimpleKeyListenerHelper with the adapter and key code arguments
        simpleKeyListenerHelper.notifyListener(adapter, 127, optionPane);
        
        // Assert that the focus cycle root property of the JOptionPane is false
        assertFalse(optionPane.isFocusCycleRoot());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testNotifyListenerWithNonNull2() throws Throwable  {
        // No Comments were added
        SimpleKeyListenerAdapter arg2 = new SimpleKeyListenerAdapter();
        JLayeredPane arg0 = new JLayeredPane();
        SimpleKeyListenerHelper simpleKeyListenerHelper = new SimpleKeyListenerHelper(arg0);
        simpleKeyListenerHelper.notifyListener(arg2, 10, arg2);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testNotifyListenerWithNonNull3() throws Throwable  {
        // rollbacked to evosuite
        SimpleKeyListenerAdapter arg2 = new SimpleKeyListenerAdapter();
        JLayeredPane arg0 = new JLayeredPane();
        SimpleKeyListenerHelper simpleKeyListenerHelper = new SimpleKeyListenerHelper(arg0);
        simpleKeyListenerHelper.notifyListener(arg2, 100000000, arg2);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testNotifyListenerThrowsNullPointerException() throws Throwable  {
        // Test that a NullPointerException is thrown when attempting to notify a null listener
        JOptionPane optionPane = new JOptionPane((Object) null);
        SimpleKeyListenerHelper simpleKeyListenerHelper = new SimpleKeyListenerHelper(optionPane);
        try {
        // Attempt to notify a null listener, which should throw a NullPointerException
        simpleKeyListenerHelper.notifyListener((Object) null, 9, optionPane);
        fail("Expecting exception: NullPointerException");
        } catch (NullPointerException e) {
        // Verify that the exception is correctly caught and handled
        verifyException("com.lts.event.SimpleKeyListenerHelper", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testDetach() throws Throwable  {
        // rollbacked to evosuite
        JTabbedPane arg0 = new JTabbedPane();
        SimpleKeyListenerHelper simpleKeyListenerHelper = new SimpleKeyListenerHelper(arg0);
        simpleKeyListenerHelper.detach();
        simpleKeyListenerHelper.detach();
    }
  }
  