void () { myParent.clearOwnActionsIds(); myChild.clearOwnActionsIds(); myParent.addShortcut(ACTION_1, shortcut1); assertThat(myParent.hasOwnActionId(ACTION_1)).isTrue(); assertThat(myChild.hasOwnActionId(ACTION_1)).isFalse(); assertThat(myChild.getShortcuts(ACTION_1)).containsExactly(shortcut1); // should not have any effect myChild.removeShortcut(ACTION_1, shortcutA); assertThat(myParent.hasOwnActionId(ACTION_1)).isTrue(); assertThat(myChild.hasOwnActionId(ACTION_1)).isFalse(); assertThat(myChild.getShortcuts(ACTION_1)).containsExactly(shortcut1); myParent.addShortcut(ACTION_2, shortcut2); myParent.addShortcut(ACTION_2, shortcutA); myParent.addShortcut(ACTION_2, shortcutB); myChild.removeShortcut(ACTION_2, shortcutA); assertThat(myChild.getShortcuts(ACTION_2)).containsExactly(shortcut2, shortcutB); }