### Question:
DefaultPasswordHashService implements PasswordHashService { @Override public PasswordHash getPasswordHash(final String password) { final HashRequest hashRequest = new HashRequest.Builder() .setAlgorithmName(hashService.getHashAlgorithmName()) .setIterations(hashService.getHashIterations()) .setSource(ByteSource.Util.bytes(password)).build(); final Hash hash = hashService.computeHash(hashRequest); return PasswordHashImpl.create( hash.getAlgorithmName(), hash.getSalt().toBase64(), hash.getIterations(), hash.toBase64()); } 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 testDefault() { PasswordHashService hashService = new DefaultPasswordHashService(new PasswordServiceConfigBuilder().build()); PasswordHash hash = hashService.getPasswordHash("password"); assertEquals(DefaultPasswordHashService.DEFAULT_HASH_ALGORITHM, hash.getAlgorithmName()); assertEquals(DefaultPasswordHashService.DEFAULT_NUM_ITERATIONS, hash.getIterations()); assertNotNull(hash.getSalt()); assertNotNull(hash.getHashedPassword()); assertEquals(hash.getSalt(), hashService.getPasswordHash("password", hash.getSalt()).getSalt()); assertEquals(hash.getHashedPassword(), hashService.getPasswordHash("password", hash.getSalt()).getHashedPassword()); }