@Test
public void testComponentInputMapEnabledControlsFocusedKeyBindings() {

    JXMonthView monthView = new JXMonthView();
    // initial: no bindings
    assertEquals("monthView must not have in-focused keyBindings", 0, 
            monthView.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).size());
    monthView.setComponentInputMapEnabled(true);
    // setting the flag installs bindings
    assertTrue("monthView must have in-focused keyBindings after showing in popup",  
          monthView.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).size() > 0);
    monthView.setComponentInputMapEnabled(false);
    // resetting the flag uninstalls the bindings
    assertEquals("monthView must not have in-focused keyBindings", 0, 
            monthView.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).size());
}