@Test
public void testHandle() {

	AuthorizationFailureEvent event=mock(AuthorizationFailureEvent.class);
	WebAuthenticationDetails details=mock(WebAuthenticationDetails.class);
	Authentication authentication=mock(Authentication.class);
	AuthenticatedUser user=mock(AuthenticatedUser.class);
	doReturn(authentication).when(event).getAuthentication();
	doReturn(details).when(authentication).getDetails();
	doReturn(IP_ADDRESS).when(details).getRemoteAddress();
	doReturn(user).when(userContext).getCurrentUser();
	doReturn(USER_NAME).when(user).getUsername();
	authorizationFailureEventListener.handle(event);
	verify(eventService).raiseSecurityEvent(any(UnauthorizedAccessAttemptedEvent.class));
	verify(userContext).getCurrentUser();		
}