@Test
  public void testOperationMatching() {
    String operation = "opToMatch";
    Stream.of(new RequestPath("", "", "", "/" + operation + "/abc/def", null, NO_BLOB_SEGMENT_IDX_SPECIFIED),
            new RequestPath("", "", "", "/" + operation, null, NO_BLOB_SEGMENT_IDX_SPECIFIED),
            new RequestPath("", "", "", "/" + operation + "/", null, NO_BLOB_SEGMENT_IDX_SPECIFIED))
        .forEach(requestPath -> {
          assertTrue("Operation should match", requestPath.matchesOperation(operation));
          assertTrue("Operation should match", requestPath.matchesOperation("/" + operation));
          assertTrue("Operation should match", requestPath.matchesOperation("/" + operation + "/"));
          assertFalse("Operation should not match", requestPath.matchesOperation("notOpToMatch"));
        });
  }
Test the behavior of {@link RequestPath#matchesOperation(String)}.
ambry-api/src/test/java/com/github/ambry/rest/RequestPathTest.java