public void perform(final String username, final int expected) throws Exception {
final ClientInfo authSuccess = new ClientInfo(username, "192.168.0.1", "Foo/Bar");
final ClientInfo authFailed = new ClientInfo(username, "192.168.0.1", "Foo/Bar");
NexusAuthenticationEvent naeSuccess = new NexusAuthenticationEvent(this, authSuccess, true);
NexusAuthenticationEvent naeFailed = new NexusAuthenticationEvent(this, authFailed, false);
// we send same event 5 times, but only one of them should be recorded since the rest 4 are "similar" and within
// 2 sec
for (int i = 0; i < 5; i++) {
underTest.on(naeSuccess);