static LocalUri.LocalUriPathComponent getFirstLocalUriPathComponent(LocalUri localUri) {
        if (localUri.parent() instanceof LocalUri.LocalUriPathComponent) {
            return getFirstLocalUriPathComponent(localUri.parent());
        } else {
            return localUri instanceof LocalUri.LocalUriPathComponent ? (LocalUri.LocalUriPathComponent) localUri : null;
        }
    }
@Test
    void getFirstLocalUriPathComponent() {
        String path = "/example/some-id/instances/some-instance-id";
        LocalUri parsed = LocalUri.parse(path);
        LocalUri retrieved = ModelLocalUriId.getFirstLocalUriPathComponent(parsed);
        LocalUri expected = LocalUri.parse("/example");
        assertThat(retrieved).isEqualTo(expected);
    }