    @Test
    public void testRead() throws Exception {

        String body = "123ABC";
        String header = rightPad("", headerBodyLengthBeginIndex) + leftPad(String.valueOf(body.length()), headerBodyLengthEndIndex - headerBodyLengthBeginIndex, "0") + rightPad("", headerLength - headerBodyLengthEndIndex);

        byte[] buffer = new byte[header.length() + body.length()];
        System.arraycopy(header.getBytes(encoding), 0, buffer, 0, headerLength);
        System.arraycopy(body.getBytes(encoding), 0, buffer, headerLength, body.length());

        ByteArrayInputStream in = new ByteArrayInputStream(buffer);

        RequestReader.Request request = requestReader.read(in);

        assertEquals(header, request.getHeader());
        assertEquals(body, request.getBody());
    }