@Test
public void testIncompleteRead() {

  String myMessage = "{this is my message}";
  byte[] bytes = myMessage.getBytes(Charsets.UTF_8);
  InputStream stream = new ByteArrayInputStream(bytes);
  DelimitedStreamReader r = new DelimitedStreamReader(stream, Charsets.UTF_8, myMessage.length());
  try {
    r.read(myMessage.length() * 2);
    fail();
  } catch (IOException e) {
    // expected
  }
}