TestFixture.makeTransUnit(1, ContentState.NeedReview, "target");
PreviewReplaceText action =
new PreviewReplaceText(new ReplaceText(transUnit, "target",
"replace", true));
PreviewReplaceTextResult result = handler.execute(action, null);
verify(identity).checkLoggedIn();
assertThat(result.getPreviews(), Matchers.hasSize(1));
TransUnitUpdatePreview preview = result.getPreviews().get(0);
assertThat(preview.getId(), Matchers.equalTo(transUnit.getId()));
assertThat(preview.getState(),
Matchers.equalTo(ContentState.NeedReview));
assertThat(preview.getContents(), Matchers.contains("replace"));
}