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.swing.menu.MenuListener;
  import java.awt.Font;
  import java.awt.event.ActionEvent;
  import java.util.Map;
  import java.util.Properties;
  import javax.swing.Action;
  import javax.swing.JMenu;
  import javax.swing.JMenuBar;
  import javax.swing.JMenuItem;
  import javax.swing.JPasswordField;
  import javax.swing.JPopupMenu;
  import javax.swing.JRadioButtonMenuItem;
  import javax.swing.plaf.FontUIResource;
  import javax.swing.text.AbstractDocument;
  import javax.swing.text.AttributeSet;
  import javax.swing.text.DefaultStyledDocument;
  import javax.swing.text.GapContent;
  import javax.swing.text.SimpleAttributeSet;
  import javax.swing.text.StyleContext;
  import org.junit.BeforeClass;
  
  @RunWith(EvoSuiteRunner.class)
  public class MenuListenerEvoSuiteTest {
  
    @BeforeClass 
    public static void initEvoSuiteFramework(){ 
      org.evosuite.Properties.REPLACE_CALLS = true; 
    } 
  
  
    @Test
    public void test0()  throws Throwable  {
        Properties properties0 = new Properties();
        JMenuBar jMenuBar0 = new JMenuBar();
        MenuListener menuListener0 = new MenuListener((Object) "text", (Map) properties0, jMenuBar0);
        JMenu jMenu0 = new JMenu();
        ActionEvent actionEvent0 = new ActionEvent((Object) jMenu0, 0, "text", (long) 0, 0);
        // Undeclared exception!
        try {
          menuListener0.actionPerformed(actionEvent0);
          fail("Expecting exception: NullPointerException");
        } catch(NullPointerException e) {
        }
    }
  
    @Test
    public void test1()  throws Throwable  {
        GapContent gapContent0 = new GapContent();
        StyleContext styleContext0 = StyleContext.getDefaultStyleContext();
        DefaultStyledDocument defaultStyledDocument0 = new DefaultStyledDocument((AbstractDocument.Content) gapContent0, styleContext0);
        AttributeSet attributeSet0 = SimpleAttributeSet.EMPTY;
        Font font0 = defaultStyledDocument0.getFont(attributeSet0);
        Map<?, ?> map0 = font0.getAttributes();
        JMenuBar jMenuBar0 = new JMenuBar();
        MenuListener menuListener0 = new MenuListener((Object) defaultStyledDocument0, (Map) map0, jMenuBar0);
        JRadioButtonMenuItem jRadioButtonMenuItem0 = new JRadioButtonMenuItem("Monospaced", true);
        menuListener0.registerWith((JMenuItem) jRadioButtonMenuItem0);
        assertEquals(false, jRadioButtonMenuItem0.hasFocus());
    }
  
    @Test
    public void test2()  throws Throwable  {
        JPasswordField jPasswordField0 = new JPasswordField("MnemonicKey");
        FontUIResource fontUIResource0 = (FontUIResource)jPasswordField0.getFont();
        Map<?, ?> map0 = fontUIResource0.getAttributes();
        JMenu jMenu0 = new JMenu((Action) null);
        JPopupMenu jPopupMenu0 = jMenu0.getPopupMenu();
        MenuListener menuListener0 = new MenuListener((Object) "MnemonicKey", (Map) map0, jPopupMenu0);
        menuListener0.registerWith((JMenuItem) jMenu0);
        assertEquals(false, jMenu0.isFocusTraversalPolicySet());
    }
  
    @Test
    public void test3()  throws Throwable  {
        GapContent gapContent0 = new GapContent();
        StyleContext styleContext0 = StyleContext.getDefaultStyleContext();
        DefaultStyledDocument defaultStyledDocument0 = new DefaultStyledDocument((AbstractDocument.Content) gapContent0, styleContext0);
        AttributeSet attributeSet0 = SimpleAttributeSet.EMPTY;
        Font font0 = defaultStyledDocument0.getFont(attributeSet0);
        Map<?, ?> map0 = font0.getAttributes();
        JMenuBar jMenuBar0 = new JMenuBar();
        MenuListener menuListener0 = new MenuListener((Object) defaultStyledDocument0, (Map) map0, jMenuBar0);
        ActionEvent actionEvent0 = new ActionEvent((Object) gapContent0, 0, "Monospaced", 0);
        menuListener0.actionPerformed(actionEvent0);
        assertEquals("Monospaced", actionEvent0.getActionCommand());
    }
  }
  