### Question:
UserManagerCollector extends AbstractActivityCollector implements IUserMessageListener { @Handler @Override public void onUserRegister(RegisterMessage register) { ActivityItem item = ActivityItem.create() .setTitle("User registered.") .setDescription(String.format("Username: %s", register.getUsername())); getActivityLogger().addActivityItem(item); } @Inject protected  UserManagerCollector(ActivityLogger activityLogger); @Handler @Override void onUserRegister(RegisterMessage register); @Handler @Override void onUserLogin(LoginMessage login); @Handler @Override void onUserLogout(LogoutMessage logout);  }### Answer:
@Test public void testOnUserRegister() { RegisterMessage msg = new RegisterMessage("username"); collector.onUserRegister(msg); CollectorTestUtils.captureAddActivityItem(ActivityType.INFORMATION, activityLogger); }