### Question:
S2Client extends DefaultSubscriber<Response> { public <T extends Request> void request(T requestData) { if (!done.get()) { require("request", requestData); if (traced) tracer.fire(requestData); channelProvider.getChannel().input(new RequestSerializer().apply(requestData)); } else { throw new IllegalStateException("Client is already stopped."); } } private  S2Client(Builder builder); static S2ClientSyntax starcraft2Client(); Flowable<Response> responseStream(); void request(T requestData); void request(BuilderSyntax<T> requestDataBuilder); Response requestSync(T requestData); Maybe<Response> waitForResponse(ResponseType responseType); Response requestSync(BuilderSyntax<T> requestDataBuilder); S requestSync(T requestData, Class<S> responseClass); S requestSync(
            BuilderSyntax<T> requestDataBuilder, Class<S> responseClass); boolean isDone(); boolean stop(); boolean fullStop(); boolean await(); @Override void onNext(Response response); @Override void onError(Throwable throwable); @Override void onComplete(); String getConnectToIp(); Integer getConnectToPort(); int getRequestTimeoutInMillis(); int getConnectTimeoutInMillis(); boolean isTraced(); S2Client untilReady(); S2Client untilReady(Runnable onPull); @Override String toString();  }### Answer:
@Test void throwsExceptionForNullRequest() { assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> aSampleS2Client().start().request((Request) nothing())) .withMessage("request is required"); }
@Test void doesNotUseTracingIfDisabled() { DataFlowTracer tracer = mock(DataFlowTracer.class); S2Client client = aSampleS2Client().traced(false).withTracer(tracer).start(); client.request(ping()); verifyNoMoreInteractions(tracer); }