@Test
public void testCommitCancelActionsFireCommit() {

    JXDatePicker picker = new JXDatePicker();
    Action commitAction = picker.getActionMap().get(JXDatePicker.COMMIT_KEY);
    final ActionReport report = new ActionReport();
    picker.addActionListener(report);
    commitAction.actionPerformed(null);
    assertEquals(1, report.getEventCount());
    assertEquals(JXDatePicker.COMMIT_KEY, report.getLastActionCommand());
}