### Question:
CommonService { public String retrieveSingleMessage(CommandSender sender, MessageKey key) { return messages.retrieveSingle(sender, key); } 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 shouldRetrieveSingleMessage() { MessageKey key = MessageKey.ACCOUNT_NOT_ACTIVATED; Player player = mock(Player.class); String text = "Test text"; given(messages.retrieveSingle(player, key)).willReturn(text); String result = commonService.retrieveSingleMessage(player, key); assertThat(result, equalTo(text)); verify(messages).retrieveSingle(player, key); }