PipedInputStream snk = new PipedInputStream();
out.connect(snk);
System.out.println(snk.available());
writeUTF8(out, "This is so good");
System.out.println(snk.available());
assertEquals(15, snk.available());
}
@Test(expected=IOException.class)
public void testWriteUTF8Error() throws IOException {
OutputStream out = mock(OutputStream.class);