doReturn(matches).when(glossaryDAOSpy).getSearchResult("fedora",
HasSearchType.SearchType.FUZZY, LocaleId.EN_US, 20);
// When:
long start = System.nanoTime();
GetGlossaryResult result = handler.execute(action, null);
double duration = (System.nanoTime() - start) / 1000000000.0;
log.info("************** {} second", duration);
// Then:
assertThat(result.getGlossaries(), Matchers.hasSize(2));
assertThat(result.getGlossaries().get(0).getSource(),
Matchers.equalTo("Planet Fedora"));
assertThat(result.getGlossaries().get(0).getTarget(),
Matchers.equalTo("Fedora 博客聚集"));
assertThat(result.getGlossaries().get(1).getSource(),
Matchers.equalTo("Fedora Artwork"));
assertThat(result.getGlossaries().get(1).getTarget(),
Matchers.equalTo("Fedora 美工"));
}