@Test(expected = AuthenticationException.class)
public void anInvalidUserShouldntBeAbleToConnect() {

    // Given
    given(userDao.findByUsername(AN_INVALID_USER)).willThrow(new NoResultException());
    // When
    authenticator.authenticateCredentials(AN_INVALID_USER, AN_INVALID_PASSWORD);
    // Then
    verify(httpSession, never()).setAttribute(anyString(), any());
}