public static KeyId ofBytes(byte[] keyIdBytes) {
        Objects.requireNonNull(keyIdBytes);
        return new KeyId(Arrays.copyOf(keyIdBytes, keyIdBytes.length));
    }
@Test
    void malformed_utf8_key_id_is_rejected_on_construction() {
        byte[] malformedIdBytes = new byte[]{ (byte)0xC0 }; // First part of a 2-byte continuation without trailing byte
        assertThrows(IllegalArgumentException.class, () -> KeyId.ofBytes(malformedIdBytes));
    }