### Question:
EventSchedulerService extends EventSchedulerGrpc.EventSchedulerImplBase implements
        AxonServerClientService { @Override public void cancelScheduledEvent(CancelScheduledEventRequest request, StreamObserver<InstructionAck> responseObserver) { try { standaloneTaskManager.cancel(request.getToken()); responseObserver.onNext(InstructionAck.newBuilder() .setSuccess(true) .build()); responseObserver.onCompleted(); } catch (Exception ex) { responseObserver.onError(GrpcExceptionBuilder.build(ex)); } } EventSchedulerService(StandaloneTaskManager standaloneTaskManager,
                                 TaskPayloadSerializer taskPayloadSerializer); @Override void scheduleEvent(ScheduleEventRequest request, StreamObserver<ScheduleToken> responseObserver); @Override void rescheduleEvent(RescheduleEventRequest request,
                                StreamObserver<ScheduleToken> responseObserver); @Override void cancelScheduledEvent(CancelScheduledEventRequest request,
                                     StreamObserver<InstructionAck> responseObserver);  }### Answer:
@Test public void cancelScheduledEvent() { FakeStreamObserver<InstructionAck> responseObserver = new FakeStreamObserver<>(); CancelScheduledEventRequest request = CancelScheduledEventRequest.newBuilder() .setToken("123") .build(); testSubject.cancelScheduledEvent(request, responseObserver); assertFalse(responseObserver.values().isEmpty()); InstructionAck ack = responseObserver.values().get(0); assertTrue(ack.getSuccess()); verify(standaloneTaskManager).cancel("123"); assertEquals(1, responseObserver.completedCount()); }