### Question:
WebUtils { protected static String createString (InputStream in, String encoding) throws IOException { encoding = encoding == null ? "UTF-8" : encoding; ByteArrayOutputStream baos = new ByteArrayOutputStream(); byte[] buf = new byte[8192]; int len = 0; while ((len = in.read(buf)) != -1) { baos.write(buf, 0, len); } return new String(baos.toByteArray(), encoding); } protected  WebUtils(); static String readContentFromWebsite(String websiteURL);  }### Answer:
@Test public void testNullEncoding () throws IOException { byte[] array = new byte[8]; InputStream inputStream = new ByteArrayInputStream(array); WebUtils.createString(inputStream, null); }
@Test public void testEncoding () throws IOException { byte[] array = new byte[8]; InputStream inputStream = new ByteArrayInputStream(array); WebUtils.createString(inputStream, "ASCII"); }