### Question:
NewAPI { public boolean isNPC(Player player) { return PlayerUtils.isNpc(player); } @Inject  NewAPI(AuthMe plugin, DataSource dataSource, PasswordSecurity passwordSecurity,
           Management management, ValidationService validationService, PlayerCache playerCache); static NewAPI getInstance(); AuthMe getPlugin(); String getPluginVersion(); boolean isAuthenticated(Player player); boolean isNPC(Player player); boolean isUnrestricted(Player player); Location getLastLocation(Player player); boolean isRegistered(String playerName); boolean checkPassword(String playerName, String passwordToCheck); boolean registerPlayer(String playerName, String password); void forceLogin(Player player); void forceLogout(Player player); void forceRegister(Player player, String password, boolean autoLogin); void forceRegister(Player player, String password); void forceUnregister(Player player); void forceUnregister(String name); List<String> getRegisteredNames(); List<String> getRegisteredRealNames();  }### Answer:
@Test public void shouldReturnIfPlayerIsNpc() { Player player = mock(Player.class); given(player.hasMetadata("NPC")).willReturn(true); boolean result = api.isNPC(player); assertThat(result, equalTo(true)); verify(player).hasMetadata("NPC"); }