@Test public void testRollbackShouldDeleteCurrentVariantsWhenTmTextUnitDidNotHaveAnyVariants() throws InterruptedException { TMTextUnit tmTextUnit = tmService.addTMTextUnit(tm.getId(), asset.getId(), "hello_world", "Hello World!", "Comments about hello world"); Long tmTextUnitId = tmTextUnit.getId(); DateTime dateTimeBeforeAddingVariant = new DateTime(); assertOnlyEnglishVariantIsPresent(tmTextUnitId); Thread.sleep(10); tmService.addCurrentTMTextUnitVariant(tmTextUnit.getId(), frLocaleId, "Bonjour le monde!"); tmService.addCurrentTMTextUnitVariant(tmTextUnit.getId(), jaLocaleId, "こんにちは、世界!"); assertCurrentVariantWasSet("The added variants should be set as current", Arrays.asList(frLocaleId, jaLocaleId), tmTextUnitId); currentVariantRollbackService.rollbackCurrentVariantsFromTMToDate(dateTimeBeforeAddingVariant, tm.getId()); assertNoCurrentVariantSet("After rollback, there should not be any current variants anymore", Arrays.asList(frLocaleId, jaLocaleId), tmTextUnitId); }
public void rollbackCurrentVariantsFromTMToDate(DateTime rollbackDateTime, Long tmId) { rollbackCurrentVariantsFromTMToDate(rollbackDateTime, tmId, new CurrentVariantRollbackParameters()); }
CurrentVariantRollbackService { public void rollbackCurrentVariantsFromTMToDate(DateTime rollbackDateTime, Long tmId) { rollbackCurrentVariantsFromTMToDate(rollbackDateTime, tmId, new CurrentVariantRollbackParameters()); } }
CurrentVariantRollbackService { public void rollbackCurrentVariantsFromTMToDate(DateTime rollbackDateTime, Long tmId) { rollbackCurrentVariantsFromTMToDate(rollbackDateTime, tmId, new CurrentVariantRollbackParameters()); }  }
CurrentVariantRollbackService { public void rollbackCurrentVariantsFromTMToDate(DateTime rollbackDateTime, Long tmId) { rollbackCurrentVariantsFromTMToDate(rollbackDateTime, tmId, new CurrentVariantRollbackParameters()); }  void rollbackCurrentVariantsFromTMToDate(DateTime rollbackDateTime, Long tmId); @Transactional void rollbackCurrentVariantsFromTMToDate(DateTime rollbackDateTime, Long tmId, CurrentVariantRollbackParameters extraParameters); }
CurrentVariantRollbackService { public void rollbackCurrentVariantsFromTMToDate(DateTime rollbackDateTime, Long tmId) { rollbackCurrentVariantsFromTMToDate(rollbackDateTime, tmId, new CurrentVariantRollbackParameters()); }  void rollbackCurrentVariantsFromTMToDate(DateTime rollbackDateTime, Long tmId); @Transactional void rollbackCurrentVariantsFromTMToDate(DateTime rollbackDateTime, Long tmId, CurrentVariantRollbackParameters extraParameters);  }