void () { MouseShortcut mouseShortcut = new MouseShortcut(MouseEvent.BUTTON1, 0, 1); myParent.addShortcut(ACTION_2, mouseShortcut); Keymap grandChild = myChild.deriveKeymap("GrandChild"); grandChild.removeShortcut(ACTION_2, mouseShortcut); grandChild.addShortcut(ACTION_1, mouseShortcut); assertThat(grandChild.getActionIds(mouseShortcut)).containsExactly(ACTION_1); }