content: /*
   * This file was automatically generated by UTestGen and EvoSuite
   * Wed Mar 20 20:28:30 GMT 2024
   */
  
  package net.sourceforge.squirrel_sql.fw.gui;
  
  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 javax.swing.JInternalFrame;
  import net.sourceforge.squirrel_sql.fw.gui.CascadeInternalFramePositioner;
  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 CascadeInternalFramePositioner_ESTest extends CascadeInternalFramePositioner_ESTest_scaffolding {
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testPositionInternalFrameWithJInternalFrameWhereGetFocusTraversalKeysEnabledIsTrue() throws Throwable  {
        // Given a JInternalFrame object "frame"
        JInternalFrame frame = new JInternalFrame();
        
        // When we set the icon property of the frame to true
        frame.setIcon(true);
        
        // And we position the frame using the CascadeInternalFramePositioner
        CascadeInternalFramePositioner positioner = new CascadeInternalFramePositioner();
        positioner.positionInternalFrame(frame);
        
        // Then the focus traversal policy of the frame should be set to true
        assertTrue(frame.isFocusTraversalPolicySet());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testPositionInternalFrameWithJInternalFrameWhereGetIgnoreRepaintIsFalse() throws Throwable  {
        // Given a JInternalFrame with a title "w5" and a content pane containing another JInternalFrame
        JInternalFrame arg0 = new JInternalFrame();
        arg0.setTitle("w5");
        JInternalFrame jInternalFrame = new JInternalFrame("", false, false, true, false);
        jInternalFrame.setContentPane(arg0);
        
        // When the CascadeInternalFramePositioner positions the internal frame
        CascadeInternalFramePositioner cascadeInternalFramePositioner = new CascadeInternalFramePositioner();
        cascadeInternalFramePositioner.positionInternalFrame(arg0);
        
        // Then assert that the focus traversal policy is set for the internal frame
        assertTrue(arg0.isFocusTraversalPolicySet());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testPositionInternalFrameWithJInternalFrameWhereIsFocusTraversalPolicyProviderIsFalse() throws Throwable  {
        // Create a new instance of the CascadeInternalFramePositioner class
        CascadeInternalFramePositioner cascadeInternalFramePositioner = new CascadeInternalFramePositioner();
        
        // Create two new instances of JInternalFrame, one for arg0 and one for jInternalFrame
        JInternalFrame arg0 = new JInternalFrame();
        JInternalFrame jInternalFrame = new JInternalFrame("", false, false, true, false);
        
        // Set the content pane of jInternalFrame to be the same as arg0
        jInternalFrame.setContentPane(arg0);
        
        // Position the internal frame using the CascadeInternalFramePositioner class
        cascadeInternalFramePositioner.positionInternalFrame(arg0);
        
        // Assert that the two internal frames are not the same (i.e., they have different content panes)
        assertNotSame(arg0, jInternalFrame);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testPositionInternalFrameWithJInternalFrameWhereIsFocusTraversalPolicySetIsTrue() throws Throwable  {
        // Given: A CascadeInternalFramePositioner object and a disposed JInternalFrame object
        CascadeInternalFramePositioner cascadeInternalFramePositioner = new CascadeInternalFramePositioner();
        JInternalFrame arg0 = new JInternalFrame();
        arg0.dispose();
        
        // When: The positionInternalFrame() method is called with the disposed internal frame
        cascadeInternalFramePositioner.positionInternalFrame(arg0);
        
        // Then: The ignoreRepaint property of the internal frame should be set to false
        assertFalse(arg0.getIgnoreRepaint());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testPositionInternalFrameThrowsIllegalArgumentException() throws Throwable  {
        // Create a new instance of the CascadeInternalFramePositioner class
        CascadeInternalFramePositioner cascadeInternalFramePositioner = new CascadeInternalFramePositioner();
        
        // Try to position a null JInternalFrame using the positionInternalFrame method
        try {
        cascadeInternalFramePositioner.positionInternalFrame(null);
        fail("Expecting exception: IllegalArgumentException");
        
        } catch(IllegalArgumentException e) {
        // Verify that an IllegalArgumentException was thrown as expected
        verifyException("net.sourceforge.squirrel_sql.fw.gui.CascadeInternalFramePositioner", e);}
    }
  }
  