void () { myParent.removeShortcut(ACTION_1, shortcut1); assertFalse(myParent.hasOwnActionId(ACTION_1)); assertTrue(myParent.hasOwnActionId(ACTION_2)); assertFalse(myParent.hasOwnActionId(ACTION_NON_EXISTENT)); assertSameElements(myParent.getShortcuts(ACTION_1)); assertSameElements(myParent.getShortcuts(ACTION_2), shortcut2); assertSameElements(myParent.getActionIds(shortcut1)); assertSameElements(myParent.getActionIds(shortcut2), ACTION_2); // child keymap still lists inherited shortcut assertSameElements(myChild.getShortcuts(ACTION_1), shortcut1, shortcutA); myChild.removeShortcut(ACTION_1, shortcut1); assertSameElements(myChild.getShortcuts(ACTION_1), shortcutA); assertSameElements(myChild.getActionIds(shortcut1)); assertSameElements(myChild.getActionIds(shortcutA), ACTION_1); assertTrue(myChild.hasOwnActionId(ACTION_1)); myChild.removeShortcut(ACTION_1, shortcutA); assertSameElements(myChild.getShortcuts(ACTION_1)); assertSameElements(myChild.getActionIds(shortcutA)); assertFalse(myChild.hasOwnActionId(ACTION_1)); // since equal to parent list myChild.removeShortcut(ACTION_2, shortcut2); assertSameElements(myChild.getShortcuts(ACTION_2)); assertSameElements(myChild.getActionIds(shortcut2)); assertTrue(myChild.hasOwnActionId(ACTION_2)); // since different from parent list }