class OpenShiftServer extends ExternalResource {

  protected OpenShiftMockServer mock;
  private NamespacedOpenShiftClient client;

  private final boolean https;
  // In this mode the mock web server will store, read, update and delete
  // kubernetes resources using an in memory map and will appear as a real api
  // server.
  private final boolean crudMode;

  public OpenShiftServer() {
    this(true, false);
  }

  public OpenShiftServer(boolean https) {
    this(https, false);
  }

  public OpenShiftServer(boolean https, boolean crudMode) {
    this.https = https;
    this.crudMode = crudMode;
  }

  @Override
  public void before() {<FILL_FUNCTION_BODY>}

  @Override
  public void after() {
    mock.destroy();
    client.close();
  }

  public KubernetesClient getKubernetesClient() {
    return client;
  }

  public NamespacedOpenShiftClient getOpenshiftClient() {
    return client;
  }

  public MockServerExpectation expect() {
    return mock.expect();
  }

  @Deprecated
  public <T> void expectAndReturnAsJson(String path, int code, T body) {
    expect().withPath(path).andReturn(code, body).always();
  }

  @Deprecated
  public void expectAndReturnAsString(String path, int code, String body) {
    expect().withPath(path).andReturn(code, body).always();
  }

  public OpenShiftMockServer getOpenShiftMockServer() {
    return mock;
  }

  public RecordedRequest getLastRequest() throws InterruptedException {
    return mock.getLastRequest();
  }
}

    final Map<ServerRequest, Queue<ServerResponse>> responses = new HashMap<>();
    mock = crudMode
        ? new OpenShiftMockServer(new Context(), new MockWebServer(), responses, new KubernetesMixedDispatcher(responses),
            https)
        : new OpenShiftMockServer(https);
    mock.init();
    client = mock.createOpenShiftClient();
  
<no_super_class>