Use limit() instead of capacity()

Change wrappedBuffer(ByteBuffer) to use limit() instead of capacity().
This test needs to be updated. The slice should start at position `20`, so it should be comparing with `i + 20`.