### Question:
PlayerUtils { public static boolean isNpc(Player player) { return player.hasMetadata("NPC"); } private  PlayerUtils(); static String getUuidOrName(OfflinePlayer player); static String getPlayerIp(Player p); static boolean isNpc(Player player);  }### Answer:
@Test public void shouldCheckIfIsNpc() { Player player1 = mock(Player.class); given(player1.hasMetadata("NPC")).willReturn(false); Player player2 = mock(Player.class); given(player2.hasMetadata("NPC")).willReturn(true); boolean result1 = PlayerUtils.isNpc(player1); boolean result2 = PlayerUtils.isNpc(player2); assertThat(result1, equalTo(false)); assertThat(result2, equalTo(true)); }