ResourceUtils { public static InputStream getResourceAsStream(String resourcePath) { Path path = parsePath(resourcePath); return getResourceWithAbsolutePackagePathAsStream(path.packagePath, path.resourcePath); }  static URL getResourceWithAbsolutePackagePath(String absolutePackagePath, String resourceName); static URL getResource(String resourcePath); static URL getResource(Class<?> clazz, String resourcePath); static InputStream getResourceAsStream(String resourcePath); static InputStream getResourceAsStream(Class<?> clazz, String resourcePath); static URL getResourceWithAbsolutePackagePath(Class<?> clazz, String absolutePackagePath, String resourceName); static InputStream getResourceWithAbsolutePackagePathAsStream(String absolutePackagePath, String resourceName); static InputStream getResourceWithAbsolutePackagePathAsStream(Class<?> clazz, String absolutePackagePath, String resourceName);  }
@Test public void testResourceLoading_notNormalized_asStream_noPackage() { InputStream stream = ResourceUtils.getResourceAsStream(System.class, "/org/../org/reficio/../reficio/ws/common/test/soapEncoding.xsd"); Assert.assertNotNull(stream); }
@Test public void testResourceLoadingObject_noPackage() { InputStream stream = ResourceUtils.getResourceAsStream(Object.class, "/org/reficio/ws/common/test/soapEncoding.xsd"); Assert.assertNotNull(stream); }
@Test public void testResourceLoadingThis_noPackage() { InputStream stream = ResourceUtils.getResourceAsStream(ResourceUtilsTest.class, "/org/reficio/ws/common/test/soapEncoding.xsd"); Assert.assertNotNull(stream); }
@Test public void testResourceLoadingGetClass_noPackage() { InputStream stream = ResourceUtils.getResourceAsStream(getClass(), "/org/reficio/ws/common/test/soapEncoding.xsd"); Assert.assertNotNull(stream); }
@Test public void testResourceLoadingNoClass_noPackage() { InputStream stream = ResourceUtils.getResourceAsStream("/org/reficio/ws/common/test/soapEncoding.xsd"); Assert.assertNotNull(stream); }