### Question:
CommonService { public boolean hasPermission(Player player, PermissionNode node) { return permissionsManager.hasPermission(player, node); } CommonService(); T getProperty(Property<T> property); void send(CommandSender sender, MessageKey key); void send(CommandSender sender, MessageKey key, String... replacements); String retrieveSingleMessage(CommandSender sender, MessageKey key); boolean hasPermission(Player player, PermissionNode node);  }### Answer:
@Test public void shouldCheckPermission() { Player player = mock(Player.class); PermissionNode permission = PlayerPermission.CHANGE_PASSWORD; given(permissionsManager.hasPermission(player, permission)).willReturn(true); boolean result = commonService.hasPermission(player, permission); verify(permissionsManager).hasPermission(player, permission); assertThat(result, equalTo(true)); }