### Question:
FileStreamProviderFactory implements StreamProviderFactory { @Override public InputStreamProvider newInputStreamProvider(String target) { return this.delegateToFactory(target, StreamProviderFactory::newInputStreamProvider); }  @Override InputStreamProvider newInputStreamProvider(String target); @Override OutputStreamProvider newOutputStreamProvider(String target);  }### Answer:
@Test(expected = UncheckedIOException.class) public void whenExternalResource() { StreamProviderFactory streamProviderFactory = new FileStreamProviderFactory( DataFormat.JSON ); streamProviderFactory.newInputStreamProvider("in.txt").getInputStream(); }
@Test public void whenClassPathResource() { StreamProviderFactory streamProviderFactory = new FileStreamProviderFactory( DataFormat.JSON ); InputStreamProvider inputStreamProvider = streamProviderFactory.newInputStreamProvider("classpath:in.txt"); try (InputStream inputStream= inputStreamProvider.getInputStream()) { assertNotNull(inputStream); } catch (IOException e) { e.printStackTrace(); } }