@Test public void migrationDoesNotProceedIfInvalidationFails() { when(invalidator.backupAndInvalidate()).thenThrow(new IllegalStateException()); TimeLockMigrator migrator = TimeLockMigrator.create(timestampManagementService, invalidator); assertThatThrownBy(migrator::migrate).isInstanceOf(IllegalStateException.class); verify(timestampManagementService).ping(); verify(invalidator).backupAndInvalidate(); verify(timestampManagementService, never()).fastForwardTimestamp(anyLong()); }
public static TimeLockMigrator create( TimestampManagementService timestampManagementService, TimestampStoreInvalidator invalidator) { return create(timestampManagementService, invalidator, AtlasDbConstants.DEFAULT_INITIALIZE_ASYNC); }
TimeLockMigrator extends AsyncInitializer { public static TimeLockMigrator create( TimestampManagementService timestampManagementService, TimestampStoreInvalidator invalidator) { return create(timestampManagementService, invalidator, AtlasDbConstants.DEFAULT_INITIALIZE_ASYNC); } }
TimeLockMigrator extends AsyncInitializer { public static TimeLockMigrator create( TimestampManagementService timestampManagementService, TimestampStoreInvalidator invalidator) { return create(timestampManagementService, invalidator, AtlasDbConstants.DEFAULT_INITIALIZE_ASYNC); } private  TimeLockMigrator(
            TimestampStoreInvalidator source,
            TimestampManagementService destination,
            boolean initializeAsync); }
TimeLockMigrator extends AsyncInitializer { public static TimeLockMigrator create( TimestampManagementService timestampManagementService, TimestampStoreInvalidator invalidator) { return create(timestampManagementService, invalidator, AtlasDbConstants.DEFAULT_INITIALIZE_ASYNC); } private  TimeLockMigrator(
            TimestampStoreInvalidator source,
            TimestampManagementService destination,
            boolean initializeAsync); static TimeLockMigrator create(
            TimestampManagementService timestampManagementService,
            TimestampStoreInvalidator invalidator); static TimeLockMigrator create(
            TimestampManagementService timestampManagementService,
            TimestampStoreInvalidator invalidator,
            boolean initializeAsync); @Idempotent void migrate(); }
TimeLockMigrator extends AsyncInitializer { public static TimeLockMigrator create( TimestampManagementService timestampManagementService, TimestampStoreInvalidator invalidator) { return create(timestampManagementService, invalidator, AtlasDbConstants.DEFAULT_INITIALIZE_ASYNC); } private  TimeLockMigrator(
            TimestampStoreInvalidator source,
            TimestampManagementService destination,
            boolean initializeAsync); static TimeLockMigrator create(
            TimestampManagementService timestampManagementService,
            TimestampStoreInvalidator invalidator); static TimeLockMigrator create(
            TimestampManagementService timestampManagementService,
            TimestampStoreInvalidator invalidator,
            boolean initializeAsync); @Idempotent void migrate();  }