SyncPositionResumer { public void resumePosition(final ShardingScalingJob shardingScalingJob, final DataSourceManager dataSourceManager, final ResumeBreakPointManager resumeBreakPointManager) { resumeInventoryPosition(shardingScalingJob, dataSourceManager, resumeBreakPointManager); resumeIncrementalPosition(shardingScalingJob, resumeBreakPointManager); }  void resumePosition(final ShardingScalingJob shardingScalingJob, final DataSourceManager dataSourceManager, final ResumeBreakPointManager resumeBreakPointManager); void persistPosition(final ShardingScalingJob shardingScalingJob, final ResumeBreakPointManager resumeBreakPointManager);  }
@Test public void assertResumePosition() { resumeBreakPointManager.getInventoryPositionManagerMap().put("ds0", new InventoryPositionManager<>(new PrimaryKeyPosition(0, 100))); resumeBreakPointManager.getIncrementalPositionManagerMap().put("ds0.t_order", new BasePositionManager<>()); syncPositionResumer.resumePosition(shardingScalingJob, new DataSourceManager(), resumeBreakPointManager); assertThat(shardingScalingJob.getIncrementalDataTasks().size(), is(1)); assertTrue(shardingScalingJob.getInventoryDataTasks().isEmpty()); }