@Test
public void testReadFullyPartial() throws Exception {

  String myMessage = "{this is my message}";
  byte[] bytes = myMessage.getBytes(Charsets.UTF_8);
  InputStream stream = new ByteArrayInputStream(bytes);
  Reader reader = new InputStreamReader(stream);
  char[] partialBuffer = new char[myMessage.length()/2];
  IOUtils.readFully(reader, partialBuffer, 0);
  for (int i = 0; i < partialBuffer.length; i++) {
    assertEquals(partialBuffer[i], myMessage.charAt(i));
  }
}