Add some test cases for ByteBuffer