### Question:
JDBCAuthProvider implements AuthProvider, PropertyEventListener { private String hashPassword(String password) { for (PasswordType type : passwordTypes) { password = hashPassword(password, type); } return password; } JDBCAuthProvider(); @Override void authenticate(String username, String password); @Override String getPassword(String username); @Override void setPassword(String username, String password); @Override boolean supportsPasswordRetrieval(); @Override boolean isScramSupported(); @Override String getSalt(String username); @Override int getIterations(String username); @Override String getServerKey(String username); @Override String getStoredKey(String username); @Override void propertySet(String property, Map<String, Object> params); @Override void propertyDeleted(String property, Map<String, Object> params); @Override void xmlPropertySet(String property, Map<String, Object> params); @Override void xmlPropertyDeleted(String property, Map<String, Object> params);  }### Answer:
@Test public void hashPassword() throws Exception { assertTrue(MD5_PASSWORD.equals(jdbcAuthProvider.hashPassword(PASSWORD, JDBCAuthProvider.PasswordType.md5))); assertTrue(SHA1_PASSWORD.equals(jdbcAuthProvider.hashPassword(PASSWORD, JDBCAuthProvider.PasswordType.sha1))); assertTrue(SHA256_PASSWORD.equals(jdbcAuthProvider.hashPassword(PASSWORD, JDBCAuthProvider.PasswordType.sha256))); assertTrue(SHA512_PASSWORD.equals(jdbcAuthProvider.hashPassword(PASSWORD, JDBCAuthProvider.PasswordType.sha512))); assertFalse(BCRYPTED_PASSWORD.equals(jdbcAuthProvider.hashPassword(PASSWORD, JDBCAuthProvider.PasswordType.bcrypt))); assertTrue(OpenBSDBCrypt.checkPassword(BCRYPTED_PASSWORD, PASSWORD.toCharArray())); }