### Motivation
The `write(webSocketErrorCode:)`, `readWebSocketErrorCode()`, and
`getWebSocketErrorCode(at:)` methods in ByteBuffer were not covered by
unit tests
https://github.com/apple/swift-nio/pull/3174#pullrequestreview-2743588010.
Since a peekWebSocketErrorCode() method was recently added, I figured I
should verify both the new peek API and the existing WebSocket error
code APIs behave correctly.
### Modifications
Added tests for:
write(webSocketErrorCode:)
getWebSocketErrorCode(at:)
readWebSocketErrorCode()
Tests verify:
Correct encoding and decoding of WebSocket error codes
Reader index behavior (no movement for get, movement for read)
Handling of insufficient bytes
Consistency between peek-before-read and post-read
### Result
These tests ensure the WebSocket error code APIs in ByteBuffer are
correct, and safe to use.
Co-authored-by: Cory Benfield <lukasa@apple.com>
### Motivation:
Existing get APIs require passing an explicit index and can be misused,
leading to verbose and error-prone code. Adding peek variants that
automatically use the current readerIndex improves safety and clarity.
This aims to address issue #2034 and issue #2736, and is a continuation
of PR #3157
### Modifications:
Introduced peekSlice(), peekLengthPrefixedSlice(), peekData(),
peekUUIDBytes() and peekWebSocketErrorCode().
Added tests for each peek API covering normal, empty and repeated peek
scenarios.
### Result:
Developers can now use nonmutating peek APIs to inspect ByteBuffer
contents without altering the reader index.