class KubernetesMixedDispatcher extends Dispatcher implements Resetable, CustomResourceAware {

  private final Map<ServerRequest, Queue<ServerResponse>> responses;
  private final MockDispatcher mockDispatcher;
  private final KubernetesCrudDispatcher kubernetesCrudDispatcher;

  public KubernetesMixedDispatcher(Map<ServerRequest, Queue<ServerResponse>> responses) {
    this(responses, Collections.emptyList());
  }

  public KubernetesMixedDispatcher(
      Map<ServerRequest, Queue<ServerResponse>> responses, List<CustomResourceDefinitionContext> crdContexts) {
    this.responses = responses;
    mockDispatcher = new MockDispatcher(responses);
    kubernetesCrudDispatcher = new KubernetesCrudDispatcher(crdContexts);
  }

  @Override
  public MockResponse dispatch(RecordedRequest request) throws InterruptedException {<FILL_FUNCTION_BODY>}

  @Override
  public void reset() {
    this.kubernetesCrudDispatcher.reset();
  }

  @Override
  public void expectCustomResource(CustomResourceDefinitionContext rdc) {
    this.kubernetesCrudDispatcher.expectCustomResource(rdc);
  }
}

    final Queue<ServerResponse> responseQueue = responses.get(
        new SimpleRequest(HttpMethod.valueOf(request.getMethod()), request.getPath()));
    if (responseQueue != null && !responseQueue.isEmpty()) {
      return mockDispatcher.dispatch(request);
    }
    return kubernetesCrudDispatcher.dispatch(request);
  
<no_super_class>