### Question:
TimeRefreshNotifier extends AnimationChangeAdapter implements QuietCloseable, ActiveTimeSpanChangeListener { @Override public void commit(AnimationState state, Phaser phaser) { phaser.register(); ThreadUtilities.runBackground(() -> { try { myListener.refreshNow(); } finally { phaser.arriveAndDeregister(); } }); } TimeRefreshNotifier(RefreshListener refreshListener, TimeManager timeManager, AnimationManager animationManager); @Override void activeTimeSpansChanged(ActiveTimeSpans active); @Override void close(); @Override void commit(AnimationState state, Phaser phaser);  }### Answer:
@Test public void testCommit() { EasyMockSupport support = new EasyMockSupport(); RefreshListener listener = support.createMock(RefreshListener.class); listener.refreshNow(); TimeManager timeManager = createTimeManager(support); AnimationManager animationManager = createAnimationManager(support); AnimationState state = support.createMock(AnimationState.class); support.replayAll(); try (TimeRefreshNotifier notifier = new TimeRefreshNotifier(listener, timeManager, animationManager)) { Phaser phaser = new Phaser(1); notifier.commit(state, phaser); phaser.arriveAndAwaitAdvance(); } support.verifyAll(); }