is(2)); // moved up a version
}
@Test
public void translateMultiple() throws Exception {
TranslationService transService =
seam.autowire(TranslationServiceImpl.class);
List<TransUnitUpdateRequest> translationReqs =
new ArrayList<TransUnitUpdateRequest>();
// Request 1
TransUnitId transUnitId = new TransUnitId(1L);
List<String> newContents = new ArrayList<String>(2);
newContents.add("translated 1");
newContents.add("translated 2");
translationReqs.add(new TransUnitUpdateRequest(transUnitId,
newContents, ContentState.Approved, 1));
// Request 2 (different documents)
transUnitId = new TransUnitId(2L);
newContents = new ArrayList<String>(2);
newContents.add("translated 1");
newContents.add("translated 2");
translationReqs.add(new TransUnitUpdateRequest(transUnitId,
newContents, ContentState.NeedReview, 0));
List<TranslationResult> results =
transService.translate(new LocaleId("de"), translationReqs);
// First result
TranslationResult result = results.get(0);
assertThat(result.isTranslationSuccessful(), is(true));
assertThat(result.getBaseVersionNum(), is(1));