### Question:
AuthMeApi { public static AuthMeApi getInstance() { return singleton; } @Inject  AuthMeApi(AuthMe plugin, DataSource dataSource, PlayerCache playerCache, PasswordSecurity passwordSecurity,
              Management management, ValidationService validationService, GeoIpService geoIpService); static AuthMeApi getInstance(); AuthMe getPlugin(); String getPluginVersion(); boolean isAuthenticated(Player player); boolean isNpc(Player player); boolean isUnrestricted(Player player); Location getLastLocation(Player player); String getLastIp(String playerName); List<String> getNamesByIp(String address); @Deprecated Date getLastLogin(String playerName); Instant getLastLoginTime(String playerName); 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); void changePassword(String name, String newPassword); List<String> getRegisteredNames(); List<String> getRegisteredRealNames(); String getCountryCode(String ip); String getCountryName(String ip);  }### Answer:
@Test public void shouldReturnInstanceOrNull() { AuthMeApi result = AuthMeApi.getInstance(); assertThat(result, sameInstance(api)); ReflectionTestUtils.setField(AuthMeApi.class, null, "singleton", null); assertThat(AuthMeApi.getInstance(), nullValue()); }