Stream2JSONInputStream extends InputStream implements JSONInputStream { @Override public void close() throws IOException { jsonElementStream.close(); } Stream2JSONInputStream(Stream<?> source); @Override int read(); @Override void close();  }
@Test public void shouldFailForNullSource() throws IOException { assertThrows(IllegalArgumentException.class, () -> new Stream2JSONInputStream(null).close()); }