### Question:
NewAPI { public void forceRegister(Player player, String password, boolean autoLogin) { management.performRegister(RegistrationMethod.API_REGISTRATION, ApiPasswordRegisterParams.of(player, password, autoLogin)); } @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 shouldForceRegister() { Player player = mock(Player.class); String pass = "test235"; api.forceRegister(player, pass); verify(management).performRegister(eq(RegistrationMethod.API_REGISTRATION), argThat(hasEqualValuesOnAllFields(ApiPasswordRegisterParams.of(player, pass, true)))); }
@Test public void shouldForceRegisterAndNotAutoLogin() { Player player = mock(Player.class); String pass = "test235"; api.forceRegister(player, pass, false); verify(management).performRegister(eq(RegistrationMethod.API_REGISTRATION), argThat(hasEqualValuesOnAllFields(ApiPasswordRegisterParams.of(player, pass, false)))); }