@Test(expected = NotAuthorizedException.class)
public void badCredentialsThrowUnauthorized() throws Exception {

  when(ldapAuthenticator.authenticate(badCredentials)).thenReturn(Optional.empty());
  sessionLoginResource.login(LoginRequest.from("bad", "credentials".toCharArray()));
}