### Question:
OnJoinVerifier implements Reloadable { public void checkKickNonRegistered(boolean isAuthAvailable) throws FailedVerificationException { if (!isAuthAvailable && settings.getProperty(RestrictionSettings.KICK_NON_REGISTERED)) { throw new FailedVerificationException(MessageKey.MUST_REGISTER_MESSAGE); } } OnJoinVerifier(); @PostConstruct @Override void reload(); void checkAntibot(JoiningPlayer joiningPlayer, boolean isAuthAvailable); void checkKickNonRegistered(boolean isAuthAvailable); void checkIsValidName(String name); boolean refusePlayerForFullServer(PlayerLoginEvent event); void checkNameCasing(String connectingName, PlayerAuth auth); void checkPlayerCountry(JoiningPlayer joiningPlayer, String address,
                                   boolean isAuthAvailable); void checkSingleSession(String name);  }### Answer:
@Test public void shouldKickNonRegistered() throws FailedVerificationException { given(settings.getProperty(RestrictionSettings.KICK_NON_REGISTERED)).willReturn(true); expectValidationExceptionWith(MessageKey.MUST_REGISTER_MESSAGE); onJoinVerifier.checkKickNonRegistered(false); }
@Test public void shouldNotKickRegisteredPlayer() throws FailedVerificationException { onJoinVerifier.checkKickNonRegistered(true); }
@Test public void shouldNotKickUnregisteredPlayer() throws FailedVerificationException { given(settings.getProperty(RestrictionSettings.KICK_NON_REGISTERED)).willReturn(false); onJoinVerifier.checkKickNonRegistered(false); }