### Question:
StringSource implements Source { @Override public InputStream getInputStream() throws IOException { return new ByteArrayInputStream( content.getBytes( StandardCharsets.UTF_8 ) ); } StringSource( CharSequence content );  StringSource( CharSequence content, String location ); @Override InputStream getInputStream(); @Override String getLocation(); String getContent(); @Override String toString(); @Override int hashCode(); @Override boolean equals( Object obj );  }### Answer:
@Test public void testGetInputStream() throws Exception { StringSource source = new StringSource( "Hello World!" ); try ( InputStream is = source.getInputStream(); Scanner scanner = new Scanner( is ) ) { assertEquals( "Hello World!", scanner.nextLine() ); } }