@Test
public void testHandle_when_account_is_not_locked() {

	AuthenticationFailureBadCredentialsEvent loginFailureEvent=mock(AuthenticationFailureBadCredentialsEvent.class);
	Authentication authentication=mock(Authentication.class);
	WebAuthenticationDetails webAuthenticationDetails=mock(WebAuthenticationDetails.class);
	Object name=new String(username);
	when(loginFailureEvent.getAuthentication()).thenReturn(authentication);
	when(authentication.getDetails()).thenReturn(webAuthenticationDetails);
	when(webAuthenticationDetails.getRemoteAddress()).thenReturn("127.0.0.1");
	when(authentication.getPrincipal()).thenReturn(name);
	Users user=mock(Users.class);
	when(user.getFailedLoginAttempts()).thenReturn(0);
	when(usersRepository.loadUserByUsername(username)).thenReturn(user);
	loginFailureEventListener.handle(loginFailureEvent);
	verify(usersRepository).updateUser(user);
}