### Question:
PasswordSecurity implements Reloadable { @PostConstruct @Override public void reload() { HashAlgorithm algorithm = settings.getProperty(SecuritySettings.PASSWORD_HASH); this.encryptionMethod = initializeEncryptionMethodWithEvent(algorithm); this.legacyAlgorithms = settings.getProperty(SecuritySettings.LEGACY_HASHES); } PasswordSecurity(Map<String, HashedPassword> storage, EncryptionMethod encryptionMethod); @PostConstruct @Override void reload(); HashedPassword computeHash(String password, String playerName); boolean comparePassword(String password, String playerName); boolean comparePassword(String password, HashedPassword hashedPassword, String playerName);  }### Answer:
@Test public void shouldReloadSettings() { given(settings.getProperty(SecuritySettings.PASSWORD_HASH)).willReturn(HashAlgorithm.MD5); given(settings.getProperty(SecuritySettings.LEGACY_HASHES)) .willReturn(newHashSet(HashAlgorithm.CUSTOM, HashAlgorithm.BCRYPT)); reset(pluginManager); passwordSecurity.reload(); assertThat(ReflectionTestUtils.getFieldValue(PasswordSecurity.class, passwordSecurity, "encryptionMethod"), instanceOf(Md5.class)); Set<HashAlgorithm> legacyHashesSet = newHashSet(HashAlgorithm.CUSTOM, HashAlgorithm.BCRYPT); assertThat(ReflectionTestUtils.getFieldValue(PasswordSecurity.class, passwordSecurity, "legacyAlgorithms"), equalTo(legacyHashesSet)); }