### Question:
ConfigResource { public InputStream getInputStream() { final String[] split = sourceURI.split(SEPARATOR); if (split.length != 2) { throw new IllegalArgumentException(sourceURI + " is invalid path. The path should follow " + "scheme: } var sourceType = split[0].toUpperCase(); var pathToSource = split[1]; switch (Type.valueOf(sourceType)) { case CLASSPATH: return classpathResourcePointer.apply(pathToSource); case FILE: return fileResourcePointer.apply(pathToSource); default: throw new UnsupportedOperationException("Rhino knows only about classpath files or" + " files on file system."); } } ConfigResource(String sourceURI); InputStream getInputStream();  }### Answer:
@Test public void testReadFileResource() throws Exception { final URL resource = getClass().getResource("/rhino.properties"); try (var fr = new ConfigResource("file: assertThat(fr, notNullValue()); } }
@Test(expected = ConfigurationNotFoundException.class) public void testReadNotExistingFileResource() throws Exception { try (var fr = new ConfigResource("file: assertThat(fr, nullValue()); } }
@Test public void testReadClasspathFileResource() throws Exception { try (var fr = new ConfigResource("classpath: assertThat(fr, notNullValue()); } }