### Question:
DutyQueue { public synchronized void cancel() { futureDuties.cancel(false); pendingActions.clear(); } DutyQueue(final SafeFuture<ScheduledDuties> futureDuties); void onBlockProductionDue(final UInt64 slot); void onAttestationCreationDue(final UInt64 slot); void onAttestationAggregationDue(final UInt64 slot); int countDuties(); synchronized void cancel();  }### Answer:
@Test public void cancel_shouldCancelFuture() { duties.cancel(); assertThat(scheduledDutiesFuture).isCancelled(); }