@Test
public void testAvailable() throws IOException {

    final ByteArrayInputStream inputStream = new ByteArrayInputStream(new byte[] {1, 2, 3});
    final SessionInputBuffer inBuffer = new SessionInputBufferImpl(16);
    final InputStream in = new ContentLengthInputStream(inBuffer, inputStream, 3L);
    Assert.assertEquals(0, in.available());
    in.read();
    Assert.assertEquals(2, in.available());
    in.close();
}