@Test public void convergeCompleteAction() { final Converger c = Replicant.context().getConverger(); safeAction( c::convergeComplete ); final AtomicInteger callCount = new AtomicInteger(); safeAction( () -> c.setConvergeCompleteAction( callCount::incrementAndGet ) ); safeAction( c::convergeComplete ); assertEquals( callCount.get(), 1 ); safeAction( c::convergeComplete ); assertEquals( callCount.get(), 2 ); safeAction( () -> c.setConvergeCompleteAction( null ) ); safeAction( c::convergeComplete ); assertEquals( callCount.get(), 2 ); }
@Observable abstract void setConvergeCompleteAction( @Nullable SafeProcedure convergeCompleteAction );
Converger extends ReplicantService { @Observable abstract void setConvergeCompleteAction( @Nullable SafeProcedure convergeCompleteAction ); }
Converger extends ReplicantService { @Observable abstract void setConvergeCompleteAction( @Nullable SafeProcedure convergeCompleteAction ); Converger( @Nullable final ReplicantContext context ); }
Converger extends ReplicantService { @Observable abstract void setConvergeCompleteAction( @Nullable SafeProcedure convergeCompleteAction ); Converger( @Nullable final ReplicantContext context );  }
Converger extends ReplicantService { @Observable abstract void setConvergeCompleteAction( @Nullable SafeProcedure convergeCompleteAction ); Converger( @Nullable final ReplicantContext context );   }