### Question:
LoginCaptchaManager implements CaptchaManager, SettingsDependent, HasCleanup { @Override public String getCaptchaCodeOrGenerateNew(String name) { return captchaCodeStorage.getCodeOrGenerateNew(name); } @Inject  LoginCaptchaManager(Settings settings); void increaseLoginFailureCount(String name); @Override boolean isCaptchaRequired(String playerName); @Override String getCaptchaCodeOrGenerateNew(String name); @Override boolean checkCode(Player player, String code); void resetLoginFailureCount(String name); @Override void reload(Settings settings); @Override void performCleanup();  }### Answer:
@Test public void shouldHaveSameCodeAfterGeneration() { String player = "Tester"; Settings settings = mockSettings(1, 5); LoginCaptchaManager manager = new LoginCaptchaManager(settings); String code1 = manager.getCaptchaCodeOrGenerateNew(player); String code2 = manager.getCaptchaCodeOrGenerateNew(player); String code3 = manager.getCaptchaCodeOrGenerateNew(player); assertThat(code1.length(), equalTo(5)); assertThat(code2, equalTo(code1)); assertThat(code3, equalTo(code1)); }