@Test(expected = InvalidUsernamePasswordCombinationException.class)
public void testAuthWithIncorrectName() {

  Users users = createMock(Users.class);
  UserDAO userDAO = createMock(UserDAO.class);
  Authentication authentication = createMock(Authentication.class);
  expect(authentication.getName()).andReturn(TEST_USER_NAME);
  expect(userDAO.findLocalUserByName(TEST_USER_NAME)).andReturn(null);
  replay(users, userDAO, authentication);
  AmbariLocalUserProvider ambariLocalUserProvider = new AmbariLocalUserProvider(userDAO, users, passwordEncoder);
  ambariLocalUserProvider.authenticate(authentication);
}