### Question:
RequestIdentifier { public static boolean isMutationRequest(@NonNull Request esRequest) { String httpMethod = esRequest.getMethod(); return HttpPut.METHOD_NAME.equalsIgnoreCase(httpMethod) || HttpPost.METHOD_NAME.equalsIgnoreCase(httpMethod); }  static boolean isConfigRequest(@NonNull Request esRequest); static boolean isConfigUpdateRequest(@NonNull Request esRequest); static boolean isMutationRequest(@NonNull Request esRequest); static boolean isIndexRequest(@NonNull Request esRequest); static boolean isBulkRequest(@NonNull Request esRequest); static String getIndexName(@NonNull Request esRequest); static Optional<String> getBulkIndexName(@NonNull String payloadLine);  }### Answer:
@Test public void succeedIsCreateOrUpdateRequestWithCorrectMethod() { esRequest = new Request(TestConstants.POST_METHOD, String.format("%s/%s", Constants.CONFIG_PATH_EXPOSED_TO_CUSTOMER, Constants.UPDATE_REQUEST)); boolean result = RequestIdentifier.isMutationRequest(esRequest); assertTrue(result); }
@Test public void failedIsCreateOrUpdateRequestWithWrong_method() { esRequest = new Request(TestConstants.GET_METHOD, Constants.CONFIG_PATH_EXPOSED_TO_CUSTOMER); boolean result = RequestIdentifier.isMutationRequest(esRequest); assertFalse(result); }