public void onNewUser(NewUserHandler.Context context) {
    LOG.debug("User created: {}. Notifying {} handlers...",context.getLogin(), NewUserHandler.class.getSimpleName() );
    for (NewUserHandler handler : handlers) {
      handler.doOnNewUser(context);
    }
  }
@Test
  public void execute_handlers_on_new_user() {
    NewUserHandler handler1 = mock(NewUserHandler.class);
    NewUserHandler handler2 = mock(NewUserHandler.class);
    NewUserNotifier notifier = new NewUserNotifier(new NewUserHandler[]{handler1, handler2});


    notifier.onNewUser(context);

    verify(handler1).doOnNewUser(context);
    verify(handler2).doOnNewUser(context);
  }