AbstractRsJs { void addStream(List<InputStream> streams, String filename) { try { URL resource = getResource(filename); streams.add(resource.openStream()); } catch (Throwable ex) { logger.error("Fail to stream : " + filename, ex); } }  @GET @Produces(Constants.JSTYPE) Response getJs();  }
@Test public void testAddStream() throws IOException { System.out.println("addStream"); List<InputStream> streams = new ArrayList<>(); String filename = "/test.js"; instance.addStream(streams, filename); assertThat(streams).hasSize(1); instance.addStream(streams, "unknown.js"); assertThat(streams).hasSize(1); }