ResourceUtils { public static InputStream getResourceWithAbsolutePackagePathAsStream(String absolutePackagePath, String resourceName) { return getResourceWithAbsolutePackagePathAsStream(ResourceUtils.class, absolutePackagePath, resourceName); }  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() { InputStream stream = ResourceUtils.getResourceWithAbsolutePackagePathAsStream(System.class, "/org/../org/reficio/../reficio/ws/common/test/", "soapEncoding.xsd"); Assert.assertNotNull(stream); }
@Test public void testResourceLoadingObject() { InputStream stream = ResourceUtils.getResourceWithAbsolutePackagePathAsStream(Object.class, "/org/reficio/ws/common/test/", "soapEncoding.xsd"); Assert.assertNotNull(stream); }
@Test public void testResourceLoadingThis() { InputStream stream = ResourceUtils.getResourceWithAbsolutePackagePathAsStream(ResourceUtilsTest.class, "/org/reficio/ws/common/test/", "soapEncoding.xsd"); Assert.assertNotNull(stream); }
@Test public void testResourceLoadingGetClass() { InputStream stream = ResourceUtils.getResourceWithAbsolutePackagePathAsStream(getClass(), "/org/reficio/ws/common/test/", "soapEncoding.xsd"); Assert.assertNotNull(stream); }
@Test public void testResourceLoadingNoClass() { InputStream stream = ResourceUtils.getResourceWithAbsolutePackagePathAsStream("/org/reficio/ws/common/test/", "soapEncoding.xsd"); Assert.assertNotNull(stream); }