rewind() just sets the position to 0 and clears the mark, so this test is essentially actually just testing that rewind() doesn't change the limit on a ByteBuffer.  Was that the intention?