public static void limit(Buffer buffer, int newLimit) {
        buffer.limit(newLimit);
    }
@Test
    public void testLimit() {
        ByteBuffer byteBuffer = ByteBuffer.allocate(4);
        byteBuffer.putInt(1);
        Assertions.assertDoesNotThrow(() -> BufferUtils.limit(byteBuffer, 4));
    }