@Test public void givenPathToResource_whenGetResourcePathIsCalled_thenProperPathIsReturned() { String location = "eu/dnetlib/iis/common/data/@a/static-resource-file.txt"; assertThat(getResourcePath(location), endsWith(location)); }
public static String getResourcePath(String location) { try { return new ClassPathResource(location).getURI().getPath(); } catch (IOException e) { throw new RuntimeException(e); } }
ClassPathResourceProvider { public static String getResourcePath(String location) { try { return new ClassPathResource(location).getURI().getPath(); } catch (IOException e) { throw new RuntimeException(e); } } }
ClassPathResourceProvider { public static String getResourcePath(String location) { try { return new ClassPathResource(location).getURI().getPath(); } catch (IOException e) { throw new RuntimeException(e); } }  }
ClassPathResourceProvider { public static String getResourcePath(String location) { try { return new ClassPathResource(location).getURI().getPath(); } catch (IOException e) { throw new RuntimeException(e); } }  static String getResourcePath(String location); static String getResourceContent(String location); static List<String> getResourcesContents(String... locations); static InputStream getResourceInputStream(String location); static InputStreamReader getResourceReader(String location); }
ClassPathResourceProvider { public static String getResourcePath(String location) { try { return new ClassPathResource(location).getURI().getPath(); } catch (IOException e) { throw new RuntimeException(e); } }  static String getResourcePath(String location); static String getResourceContent(String location); static List<String> getResourcesContents(String... locations); static InputStream getResourceInputStream(String location); static InputStreamReader getResourceReader(String location);  }