### Question:
RegistrationCaptchaManager implements CaptchaManager, SettingsDependent, HasCleanup { @Override public boolean isCaptchaRequired(String name) { return isEnabled && !verifiedNamesForRegistration.contains(name.toLowerCase()); } @Inject  RegistrationCaptchaManager(Settings settings); @Override boolean isCaptchaRequired(String name); @Override String getCaptchaCodeOrGenerateNew(String name); @Override boolean checkCode(Player player, String code); @Override void reload(Settings settings); @Override void performCleanup();  }### Answer:
@Test public void shouldBeDisabled() { Settings settings = mock(Settings.class); given(settings.getProperty(SecuritySettings.ENABLE_CAPTCHA_FOR_REGISTRATION)) .willReturn(false).willReturn(true); given(settings.getProperty(SecuritySettings.CAPTCHA_LENGTH)).willReturn(12); RegistrationCaptchaManager captchaManager1 = new RegistrationCaptchaManager(settings); RegistrationCaptchaManager captchaManager2 = new RegistrationCaptchaManager(settings); assertThat(captchaManager1.isCaptchaRequired("bob"), equalTo(false)); assertThat(captchaManager2.isCaptchaRequired("bob"), equalTo(true)); }