@Test public void failedIsIndexRequestWithWrongPath() { esRequest = new Request(TestConstants.PUT_METHOD, TestConstants.WRONG_INDEX_PATH); boolean result = RequestIdentifier.isIndexRequest(esRequest); assertFalse(result); }
public static boolean isIndexRequest(@NonNull Request esRequest) { String[] pathFields = esRequest.getEndpoint().substring(1).split("/"); return (pathFields.length == Constants.INDEX_PATH_LENGTH || pathFields.length == Constants.INDEX_PATH_LENGTH_WITHOUT_ID) && !Constants.SEARCH_REQUEST.equals(pathFields[1]) && pathFields[0].matches(Constants.INDEX_REGEX); }
RequestIdentifier { public static boolean isIndexRequest(@NonNull Request esRequest) { String[] pathFields = esRequest.getEndpoint().substring(1).split("/"); return (pathFields.length == Constants.INDEX_PATH_LENGTH || pathFields.length == Constants.INDEX_PATH_LENGTH_WITHOUT_ID) && !Constants.SEARCH_REQUEST.equals(pathFields[1]) && pathFields[0].matches(Constants.INDEX_REGEX); } }
RequestIdentifier { public static boolean isIndexRequest(@NonNull Request esRequest) { String[] pathFields = esRequest.getEndpoint().substring(1).split("/"); return (pathFields.length == Constants.INDEX_PATH_LENGTH || pathFields.length == Constants.INDEX_PATH_LENGTH_WITHOUT_ID) && !Constants.SEARCH_REQUEST.equals(pathFields[1]) && pathFields[0].matches(Constants.INDEX_REGEX); }  }
RequestIdentifier { public static boolean isIndexRequest(@NonNull Request esRequest) { String[] pathFields = esRequest.getEndpoint().substring(1).split("/"); return (pathFields.length == Constants.INDEX_PATH_LENGTH || pathFields.length == Constants.INDEX_PATH_LENGTH_WITHOUT_ID) && !Constants.SEARCH_REQUEST.equals(pathFields[1]) && pathFields[0].matches(Constants.INDEX_REGEX); }  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 isIndexRequest(@NonNull Request esRequest) { String[] pathFields = esRequest.getEndpoint().substring(1).split("/"); return (pathFields.length == Constants.INDEX_PATH_LENGTH || pathFields.length == Constants.INDEX_PATH_LENGTH_WITHOUT_ID) && !Constants.SEARCH_REQUEST.equals(pathFields[1]) && pathFields[0].matches(Constants.INDEX_REGEX); }  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);  }