@Test
public void testCommitCancelActionsFireCancel() {

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