@Test
public void bcryptAuthenticatorFailsForBadPassword() throws Exception {

  when(userDAO.getHashedPassword("sysadmin"))
      .thenReturn(Optional.of(hashedPass));
  Optional<User> missingUser =
      bcryptAuthenticator.authenticate(new BasicCredentials("sysadmin", "badpass"));
  assertThat(missingUser).isEmpty();
}