@Test public void failedIsCreateOrUpdateRequestWithWrong_method() { esRequest = new Request(TestConstants.GET_METHOD, Constants.CONFIG_PATH_EXPOSED_TO_CUSTOMER); boolean result = RequestIdentifier.isMutationRequest(esRequest); assertFalse(result); }
public static boolean isMutationRequest(@NonNull Request esRequest) { String httpMethod = esRequest.getMethod(); return HttpPut.METHOD_NAME.equalsIgnoreCase(httpMethod) || HttpPost.METHOD_NAME.equalsIgnoreCase(httpMethod); }
RequestIdentifier { public static boolean isMutationRequest(@NonNull Request esRequest) { String httpMethod = esRequest.getMethod(); return HttpPut.METHOD_NAME.equalsIgnoreCase(httpMethod) || HttpPost.METHOD_NAME.equalsIgnoreCase(httpMethod); } }
RequestIdentifier { public static boolean isMutationRequest(@NonNull Request esRequest) { String httpMethod = esRequest.getMethod(); return HttpPut.METHOD_NAME.equalsIgnoreCase(httpMethod) || HttpPost.METHOD_NAME.equalsIgnoreCase(httpMethod); }  }
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); }
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);  }