Mockito.verify(result, Mockito.never()).onFailure(Matchers.anyString());
Mockito.verify(result).onSuccess(Matchers.argThat(new ArgumentMatcher<List<SearchResultItem>>() {
@Override
public boolean matches(final Object arg0) {
final List<SearchResultItem> list = (List<SearchResultItem>) arg0;
final SearchResultItem searchResultItem1 = list.get(0);
final SearchResultItem searchResultItem2 = list.get(1);
assertEquals(2, list.size());
assertEquals("Juliet", searchResultItem1.getFirst());
assertEquals("Capulet", searchResultItem1.getLast());
assertEquals("JuliC", searchResultItem1.getNick());
assertEquals("juliet@shakespeare.lit", searchResultItem1.getEmail());
assertEquals("juliet@capulet.com", searchResultItem1.getJid().toString());
assertEquals("tybalt@shakespeare.lit", searchResultItem2.getJid().toString());
return true;
}
}));
}