### Question:
GrpcTccClientMessageSender implements TccMessageSender { @Override public void onDisconnected() { tccBlockingEventService.onDisconnected(serviceConfig); } GrpcTccClientMessageSender(ServiceConfig serviceConfig,
      ManagedChannel channel,
      String address,
      TccMessageHandler handler,
      LoadBalanceContext loadContext); @Override void onConnected(); @Override void onDisconnected(); @Override ServerMeta onGetServerMeta(); @Override void close(); @Override String target(); @Override AlphaResponse participationStart(ParticipationStartedEvent participationStartedEvent); @Override AlphaResponse participationEnd(ParticipationEndedEvent participationEndedEvent); @Override AlphaResponse tccTransactionStart(TccStartedEvent tccStartEvent); @Override AlphaResponse tccTransactionStop(TccEndedEvent tccEndEvent); @Override AlphaResponse coordinate(CoordinatedEvent coordinatedEvent);  }### Answer:
@Test public void serviceOnDisconnectedTest() { final GrpcServiceConfig[] requestCaptor = new GrpcServiceConfig[1]; TccEventServiceImplBase serviceImpl = new TccEventServiceImplBase() { public void onDisconnected(GrpcServiceConfig request, StreamObserver<GrpcAck> responseObserver) { requestCaptor[0] = request; responseObserver.onNext(ack); responseObserver.onCompleted(); } }; serviceRegistry.addService(serviceImpl); service.onDisconnected(); assertThat(requestCaptor[0].getServiceName(), is(serviceConfig.serviceName())); assertThat(requestCaptor[0].getInstanceId(), is(serviceConfig.instanceId())); }