### Question:
ElasticsearchClient { public Response performRequest(@NonNull Request request) { try { return restClient.performRequest(request); } catch (ResponseException responseException) { return responseException.getResponse(); } catch (IOException e) { throw new InternalErrorException(CustomerMessage.INTERNAL_ERROR, e); } }  Response performRequest(@NonNull Request request); Response performRequest(@NonNull Request request, @NonNull String endpoint); Response performRequest(@NonNull String method, @NonNull String endpoint); Response performRequest(@NonNull String method, @NonNull String endpoint, @NonNull String payload); Response performRequest(@NonNull String method, @NonNull String endpoint, @NonNull String payload,
                                   @NonNull Map<String, String> headerMap);  }### Answer:
@Test public void succeedPerformBasicRequest() { test.performRequest(esRequest); }
@Test public void succeedWithNewEndpoint() { test.performRequest(esRequest, TestConstants.DUMMY_ENDPOINT); }
@Test public void succeedWithMethodEndpoint() { test.performRequest(esRequest, TestConstants.DUMMY_ENDPOINT); }
@Test public void succeedWithMethodEndpointPayload() { test.performRequest(TestConstants.DUMMY_METHOD, TestConstants.DUMMY_ENDPOINT, TestConstants.DUMMY_PAYLOAD); }
@Test public void succeedWithMethodEndpointPayloadHeaders() { test.performRequest(TestConstants.DUMMY_METHOD, TestConstants.DUMMY_ENDPOINT, TestConstants.DUMMY_PAYLOAD, TestConstants.DUMMY_HEADER_MAP); }
@Test public void succeedPerformBasicRequestWithResponseException() throws IOException { when(mockRestClient.performRequest(esRequest)).thenThrow(ResponseException.class); test.performRequest(esRequest); }
@Test public void failedPerformBasicRequestWithIOException() throws IOException { when(mockRestClient.performRequest(esRequest)).thenThrow(IOException.class); try { test.performRequest(esRequest); } catch (InternalErrorException e) { Assert.assertEquals(CustomerMessage.INTERNAL_ERROR, e.getMessage()); } }