Updated captions to use a ByteBuffer implementation and added a test case