UriUtil { public static String getPath(final URI uri) { return isFileUri(uri) ? uri.getPath() : uri.toASCIIString(); } private  UriUtil(); static URI toUri(final String s); static boolean isFileUri(final URI uri); static Optional<String> getLastSegment(final URI uri); static String getLastSegmentOrHost(final URI uri); static String getParent(final URI uri); static String getPath(final URI uri);  }
@Test public void test_getPath_file_uri_with_query() throws Exception { assertThat(getPath(URI.create("file:/Users/timur/workspace/saga/saga-core/target/test-classes/tests/Class.js?123")), equalTo("/Users/timur/workspace/saga/saga-core/target/test-classes/tests/Class.js")); }
@Test public void test_getPath_http_uri_with_query() throws Exception { assertThat(getPath(URI.create("http: }