@Test
public void testLoadUserByUsername_when_succeeds() {

	Users user = mock(Users.class);
	when(usersRepository.loadUserByUsername(username)).thenReturn(user);
	when(user.getFailedLoginAttempts()).thenReturn(0);
	when(user.getLockoutTime()).thenReturn(null);
	assertEquals(accountUserDetailsService.loadUserByUsername(username),
			user);
}