@Test(expected = ClassCastException.class) public void onApplicationEventWithInvalidEvent() { signInEventListener.onApplicationEvent(new SignInEvent("I'm a User")); }
@Override public void onApplicationEvent(SignInEvent event) { userService.addDefaultHabit(event.getUser().getId(), "en"); }
SignInEventListener implements ApplicationListener<SignInEvent> { @Override public void onApplicationEvent(SignInEvent event) { userService.addDefaultHabit(event.getUser().getId(), "en"); } }
SignInEventListener implements ApplicationListener<SignInEvent> { @Override public void onApplicationEvent(SignInEvent event) { userService.addDefaultHabit(event.getUser().getId(), "en"); } @Autowired  SignInEventListener(UserService userService); }
SignInEventListener implements ApplicationListener<SignInEvent> { @Override public void onApplicationEvent(SignInEvent event) { userService.addDefaultHabit(event.getUser().getId(), "en"); } @Autowired  SignInEventListener(UserService userService); @Override void onApplicationEvent(SignInEvent event); }
SignInEventListener implements ApplicationListener<SignInEvent> { @Override public void onApplicationEvent(SignInEvent event) { userService.addDefaultHabit(event.getUser().getId(), "en"); } @Autowired  SignInEventListener(UserService userService); @Override void onApplicationEvent(SignInEvent event);  }