OpTrackerImpl implements OpTracker<D>, ActivityDefObserver { @Override public void onOpStarted(StartedOp<D> op) { pendingOps.incrementAndGet(); pendingOpsCounter.inc(); } OpTrackerImpl(Activity activity, long slot);  OpTrackerImpl(String name, int slot, Timer cycleServiceTimer, Timer cycleResponseTimer, Counter pendingOpsCounter); @Override void onOpStarted(StartedOp<D> op); @Override void onOpSuccess(SucceededOp<D> op); @Override void onOpSkipped(SkippedOp<D> op); @Override void onOpFailure(FailedOp<D> op); @Override void setMaxPendingOps(int maxPendingOps); @Override boolean isFull(); @Override int getPendingOps(); @Override void setCycleOpFunction(LongFunction<D> newOpFunction); @Override TrackedOp<D> newOp(long cycle, OpEvents<D> strideTracker); int getMaxPendingOps(); @Override synchronized boolean awaitCompletion(long timeout); @Override String toString(); @Override void onActivityDefUpdate(ActivityDef activityDef);  }
@Test public void testLifeCycle() { OpTrackerImpl<String> tracker = new OpTrackerImpl<String>("test", 0, new Timer(), new Timer(), new Counter()); TrackedOp<String> tracked = new EventedOpImpl<>(tracker); StartedOp<String> started = tracked.start(); tracker.onOpStarted(started); SucceededOp stop = started.succeed(23); }