content: /*
   * This file was automatically generated by EvoSuite
   */
  
  package com.lts.swing.menu;
  
  import org.junit.Test;
  import org.junit.runner.RunWith;
  import org.evosuite.junit.EvoSuiteRunner;
  import static org.junit.Assert.*;
  import com.lts.LTSException;
  import com.lts.swing.menu.MenuWrapper;
  import javax.swing.Action;
  import javax.swing.JMenu;
  import javax.swing.JMenuBar;
  import javax.swing.JMenuItem;
  import javax.swing.JPopupMenu;
  import javax.swing.text.DefaultEditorKit;
  import org.junit.BeforeClass;
  
  @RunWith(EvoSuiteRunner.class)
  public class MenuWrapperEvoSuiteTest {
  
    @BeforeClass 
    public static void initEvoSuiteFramework(){ 
      org.evosuite.Properties.REPLACE_CALLS = true; 
    } 
  
  
    @Test
    public void test0()  throws Throwable  {
        MenuWrapper menuWrapper0 = new MenuWrapper((JMenuBar) null);
        JMenuItem jMenuItem0 = new JMenuItem((String) null, 40);
        // Undeclared exception!
        try {
          menuWrapper0.addMenuItem(jMenuItem0);
          fail("Expecting exception: NullPointerException");
        } catch(NullPointerException e) {
        }
    }
  
    @Test
    public void test1()  throws Throwable  {
        DefaultEditorKit.InsertTabAction defaultEditorKit_InsertTabAction0 = new DefaultEditorKit.InsertTabAction();
        JMenu jMenu0 = new JMenu((Action) defaultEditorKit_InsertTabAction0);
        JPopupMenu jPopupMenu0 = jMenu0.getPopupMenu();
        MenuWrapper menuWrapper0 = new MenuWrapper(jPopupMenu0);
        menuWrapper0.addMenuItem((JMenuItem) jMenu0);
        assertEquals(1, jMenu0.getItemCount());
        assertEquals(1, jPopupMenu0.getComponentCount());
    }
  
    @Test
    public void test2()  throws Throwable  {
        DefaultEditorKit.DefaultKeyTypedAction defaultEditorKit_DefaultKeyTypedAction0 = new DefaultEditorKit.DefaultKeyTypedAction();
        JMenu jMenu0 = new JMenu((Action) defaultEditorKit_DefaultKeyTypedAction0);
        MenuWrapper menuWrapper0 = new MenuWrapper(jMenu0);
        menuWrapper0.addSeparator();
        assertEquals(1, jMenu0.getMenuComponentCount());
        assertEquals(1, jMenu0.getItemCount());
    }
  
    @Test
    public void test3()  throws Throwable  {
        JMenu jMenu0 = new JMenu((String) null, true);
        MenuWrapper menuWrapper0 = new MenuWrapper(jMenu0);
        menuWrapper0.addMenuItem((JMenuItem) jMenu0);
        assertEquals(1, jMenu0.getMenuComponentCount());
        assertEquals(1, jMenu0.getItemCount());
    }
  
    @Test
    public void test4()  throws Throwable  {
        DefaultEditorKit.InsertTabAction defaultEditorKit_InsertTabAction0 = new DefaultEditorKit.InsertTabAction();
        JMenu jMenu0 = new JMenu((Action) defaultEditorKit_InsertTabAction0);
        JPopupMenu jPopupMenu0 = jMenu0.getPopupMenu();
        MenuWrapper menuWrapper0 = new MenuWrapper(jPopupMenu0);
        menuWrapper0.addSeparator();
        assertEquals(1, jPopupMenu0.getComponentCount());
        assertEquals(1, jMenu0.getMenuComponentCount());
    }
  
    @Test
    public void test5()  throws Throwable  {
        MenuWrapper menuWrapper0 = new MenuWrapper((JMenuBar) null);
        try {
          menuWrapper0.addSeparator();
          fail("Expecting exception: LTSException");
        } catch(LTSException e) {
          /*
           * Cannot add a separator to a menu bar
           */
        }
    }
  }
  