content: /*
   * This file was automatically generated by EvoSuite
   */
  
  package com.lts.swing;
  
  import org.junit.Test;
  import org.junit.runner.RunWith;
  import org.evosuite.junit.EvoSuiteRunner;
  import static org.junit.Assert.*;
  import com.lts.swing.SwingUtils;
  import com.lts.swing.keyboard.InputKey;
  import java.awt.LayoutManager;
  import java.util.List;
  import javax.swing.Action;
  import javax.swing.DefaultComboBoxModel;
  import javax.swing.Icon;
  import javax.swing.JCheckBox;
  import javax.swing.JComponent;
  import javax.swing.JList;
  import javax.swing.JMenuBar;
  import javax.swing.JMenuItem;
  import javax.swing.JPanel;
  import javax.swing.JToolTip;
  import javax.swing.KeyStroke;
  import javax.swing.ListModel;
  import javax.swing.text.StyledEditorKit;
  import org.junit.BeforeClass;
  
  @RunWith(EvoSuiteRunner.class)
  public class SwingUtilsEvoSuiteTest {
  
    @BeforeClass 
    public static void initEvoSuiteFramework(){ 
      org.evosuite.Properties.REPLACE_CALLS = true; 
    } 
  
  
    @Test
    public void test0()  throws Throwable  {
        JPanel jPanel0 = new JPanel((LayoutManager) null);
        SwingUtils.setBold((JComponent) jPanel0);
        assertEquals(0, jPanel0.getX());
    }
  
    @Test
    public void test1()  throws Throwable  {
        JPanel jPanel0 = new JPanel((LayoutManager) null);
        InputKey inputKey0 = InputKey.DownArrow;
        StyledEditorKit.AlignmentAction styledEditorKit_AlignmentAction0 = new StyledEditorKit.AlignmentAction("yXA]\"Ul)nhXxGU", (-385));
        SwingUtils.mapKey(inputKey0, (Action) styledEditorKit_AlignmentAction0, (JComponent) jPanel0);
        assertEquals("javax.swing.JPanel[,0,0,0x0,invalid,alignmentX=0.0,alignmentY=0.0,border=,flags=297,maximumSize=,minimumSize=,preferredSize=]", jPanel0.toString());
    }
  
    @Test
    public void test2()  throws Throwable  {
        JMenuBar jMenuBar0 = new JMenuBar();
        SwingUtils.setPreferredWidth((JComponent) jMenuBar0, 0);
        assertEquals(true, jMenuBar0.isPreferredSizeSet());
    }
  
    @Test
    public void test3()  throws Throwable  {
        SwingUtils swingUtils0 = new SwingUtils();
        assertNotNull(swingUtils0);
    }
  
    @Test
    public void test4()  throws Throwable  {
        StyledEditorKit.ItalicAction styledEditorKit_ItalicAction0 = new StyledEditorKit.ItalicAction();
        JMenuItem jMenuItem0 = new JMenuItem((String) null, (Icon) null);
        JToolTip jToolTip0 = jMenuItem0.createToolTip();
        SwingUtils.mapKeyAsDefault((KeyStroke) null, (Action) styledEditorKit_ItalicAction0, (JComponent) jToolTip0);
        assertEquals(0, jToolTip0.getDebugGraphicsOptions());
    }
  
    @Test
    public void test5()  throws Throwable  {
        JCheckBox jCheckBox0 = new JCheckBox((String) null, true);
        Object[] objectArray0 = new Object[9];
        objectArray0[0] = (Object) jCheckBox0;
        JList jList0 = new JList(objectArray0);
        List<Object> list0 = SwingUtils.toModelData(jList0);
        assertNotNull(list0);
        assertEquals(1, list0.size());
    }
  
    @Test
    public void test6()  throws Throwable  {
        JList jList0 = new JList();
        List<Object> list0 = SwingUtils.toStringList(jList0);
        assertEquals(true, list0.isEmpty());
    }
  
    @Test
    public void test7()  throws Throwable  {
        Object[] objectArray0 = new Object[17];
        objectArray0[0] = (Object) "";
        DefaultComboBoxModel defaultComboBoxModel0 = new DefaultComboBoxModel(objectArray0);
        JList jList0 = new JList((ListModel) defaultComboBoxModel0);
        // Undeclared exception!
        try {
          SwingUtils.toStringList(jList0);
          fail("Expecting exception: NullPointerException");
        } catch(NullPointerException e) {
        }
    }
  }
  