hGlossaryEntry.getGlossaryTerms().put(srcLocale,
new HGlossaryTerm("source")); // source term
when(glossaryDAO.makePersistent(hGlossaryEntry)).thenReturn(
hGlossaryEntry);
UpdateGlossaryTermResult result = handler.execute(action, null);
verify(identity).checkLoggedIn();
assertThat(targetTerm.getComments(), Matchers.hasSize(1));
assertThat(targetTerm.getComments().get(0).getComment(),
Matchers.equalTo("new comment"));
assertThat(targetTerm.getContent(), Matchers.equalTo("new target"));
verify(glossaryDAO).makePersistent(hGlossaryEntry);
verify(glossaryDAO).flush();
assertThat(result.getDetail().getTarget(),
Matchers.equalTo("new target"));
}