Updated the Java DSL to allow matching on paths