MigrationPartialSuccessState extends AbstractMigrationMigratingState implements PartialSuccessState { @Override public void forcePublish() { updateAndForceProcess(new MigrationForcePublishState(getHolder())); } MigrationPartialSuccessState(MigrationCluster holder); @Override void doAction(); @Override void forcePublish();  }
@Test public void testForcePublish(){ shardResult(1); partialSuccessState.getStateActionState().tryAction(); partialSuccessState.refresh(); verify(migrationCluster).updateStat(isA(MigrationPartialSuccessState.class)); verify(migrationCluster, times(0)).process(); logger.info("[testForcePublish]"); partialSuccessState.forcePublish(); verify(migrationCluster).updateStat(isA(MigrationForcePublishState.class)); verify(migrationCluster).process(); }