public void ignoreNonMatchingKeyEvent() {
final KeyEvent keyEvent = new KeyEvent(new JPanel(), KeyEvent.KEY_PRESSED, 0, KeyEvent.CTRL_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK, KeyEvent.VK_TAB, KeyEvent.CHAR_UNDEFINED);
keyboardShortcut.addAction(new AbstractAction() {
@Override
public void actionPerformed(ActionEvent e) {
keyEvent.consume();
}
});
keyboardShortcut.processKeyEvent(KeyStroke.getKeyStrokeForEvent(keyEvent));
assertFalse(keyEvent.isConsumed());
}