### Question:
LdpBinaryStoreServiceImpl implements LdpBinaryStoreService { Path getFile(String resource) throws URISyntaxException { final java.net.URI uri = new java.net.URI(resource); final String schema = uri.getScheme(); if ("http".compareTo(schema) != 0 && "https".compareTo(schema) != 0) { final String msg = "Binary storage not supported for URIs with " + schema + " as schema"; log.error(msg); throw new RuntimeException(msg); } final int port; if (uri.getPort() > 0) { port = uri.getPort(); } else if ("http".compareTo(schema) == 0) { port = 80; } else if ("https".compareTo(schema) == 0) { port = 443; } else { port = 0; } return base.resolve(String.format("%s.%d/%s", uri.getHost(), port, uri.getRawPath())); }  @PostConstruct void init(); @Override boolean store(String resource, InputStream stream); @Override boolean store(URI resource, InputStream stream); @Override InputStream read(String resource); @Override InputStream read(URI resource); @Override String getHash(String resource); @Override String getHash(URI uri); @Override boolean delete(URI uri); @Override boolean delete(String resource);  }### Answer:
@Test public void testGetFile() throws Exception { final LdpBinaryStoreServiceImpl store = marmotta.getService(LdpBinaryStoreServiceImpl.class); final String test1 = "http: Assert.assertThat(store.getFile(test1).toString(), CoreMatchers.endsWith(Paths.get("/localhost.8080/foo/bar/123").toString())); }