@Test public void testRollbackShouldUndoChangesToCurrentVariantsWhenTmTextUnitHadVariants() throws InterruptedException { TMTextUnit tmTextUnit = tmService.addTMTextUnit(tm.getId(), asset.getId(), "hello_world", "Hello World!", "Comments about hello world"); Long tmTextUnitId = tmTextUnit.getId(); tmService.addCurrentTMTextUnitVariant(tmTextUnit.getId(), frLocaleId, "Bonjour le monde!"); tmService.addCurrentTMTextUnitVariant(tmTextUnit.getId(), jaLocaleId, "こんにちは、世界!"); DateTime dateTimeBeforeChangingCurrentVariant = new DateTime(); assertVariantContentForCurrentVariantEquals("Bonjour le monde!", frLocaleId, tmTextUnitId); assertVariantContentForCurrentVariantEquals("こんにちは、世界!", jaLocaleId, tmTextUnitId); Thread.sleep(10); tmService.addCurrentTMTextUnitVariant(tmTextUnitId, frLocaleId, "Bonjour le monde! 2"); tmService.addCurrentTMTextUnitVariant(tmTextUnitId, frLocaleId, "Bonjour le monde! 3"); tmService.addCurrentTMTextUnitVariant(tmTextUnitId, jaLocaleId, "こんにちは、世界! 2"); tmService.addCurrentTMTextUnitVariant(tmTextUnitId, jaLocaleId, "こんにちは、世界! 3"); assertVariantContentForCurrentVariantEquals("Bonjour le monde! 3", frLocaleId, tmTextUnitId); assertVariantContentForCurrentVariantEquals("こんにちは、世界! 3", jaLocaleId, tmTextUnitId); currentVariantRollbackService.rollbackCurrentVariantsFromTMToDate(dateTimeBeforeChangingCurrentVariant, tm.getId()); assertVariantContentForCurrentVariantEquals("Bonjour le monde!", frLocaleId, tmTextUnitId); assertVariantContentForCurrentVariantEquals("こんにちは、世界!", 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);  }