LoginFailureEventListener extends EventListener { @Override public boolean canHandle(Object event) { return event instanceof AuthenticationFailureBadCredentialsEvent; } LoginFailureEventListener(short max_failed_attempts,
			EventService eventService, UsersRepository usersRepository); @Override boolean canHandle(Object event); @Override void handle(Object event);  }
@Test public void testCanHandle_when_event_matches() { AuthenticationFailureBadCredentialsEvent event=mock(AuthenticationFailureBadCredentialsEvent.class); assertEquals(loginFailureEventListener.canHandle(event),true); }
@Test public void testCanHandle_when_event_unmatch() { AuthenticationSuccessEvent event=mock(AuthenticationSuccessEvent.class); assertEquals(loginFailureEventListener.canHandle(event),false); }