### Question:
RequestPath { public boolean matchesOperation(String operation) { return matchPathSegments(operationOrBlobId, 0, operation, true) >= 0; } RequestPath(String prefix, String clusterName, String pathAfterPrefixes, String operationOrBlobId,
      SubResource subResource, int blobSegmentIdx); static RequestPath parse(RestRequest restRequest, List<String> prefixesToRemove, String clusterName); static RequestPath parse(String path, Map<String, Object> args, List<String> prefixesToRemove,
      String clusterName); String getPrefix(); String getClusterName(); String getPathAfterPrefixes(); String getOperationOrBlobId(boolean stripLeadingSlash); SubResource getSubResource(); int getBlobSegmentIdx(); boolean matchesOperation(String operation); @Override boolean equals(Object o); @Override String toString();  }### Answer:
@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")); }); }