### Question:
DefaultPasswordHashService implements PasswordHashService { @Override public boolean passwordsMatch(final String plaintext, final String stored, final String salt) { final String hash = getPasswordHash(plaintext, salt).getHashedPassword(); return hash.equals(stored); } DefaultPasswordHashService();  DefaultPasswordHashService(final PasswordServiceConfig passwordServiceConfig); @Override PasswordHash getPasswordHash(final String password); @Override PasswordHash getPasswordHash(final String password, final String salt); @Override boolean passwordsMatch(final String plaintext, final String stored, final String salt); static final String DEFAULT_HASH_ALGORITHM; static final int DEFAULT_NUM_ITERATIONS; }### Answer:
@Test public void testPasswordsMatch() { PasswordHashService hashService = new DefaultPasswordHashService(new PasswordServiceConfigBuilder().build()); PasswordHash passwordHash = hashService.getPasswordHash("password"); assertTrue(hashService.passwordsMatch("password", passwordHash.getHashedPassword(), passwordHash.getSalt())); }