public static Definitions getRootElement(DMNModelInstrumentedBase toNavigate) {
        if ( toNavigate instanceof Definitions ) {
            return (Definitions) toNavigate;
        } else if ( toNavigate.getParent() != null ) {
            return getRootElement(toNavigate.getParent());
        } else {
            throw new RuntimeException("Failed to get Definitions parent for " + toNavigate);
        }
    }
@Test
    void getRootElement() {
        String localPart = "reference";
        DMNElementReference elementReference = new TDMNElementReference();
        String href = String.format("%s#%s", nameSpace, localPart);
        elementReference.setHref(href);
        elementReference.setParent(parent);
        Definitions retrieved = DMNCompilerImpl.getRootElement(elementReference);
        assertThat(retrieved).isNotNull().isEqualTo(parent);

        InformationRequirement informationRequirement = new TInformationRequirement();
        elementReference.setParent(informationRequirement);
        assertThrows(RuntimeException.class, () -> DMNCompilerImpl.getRootElement(elementReference));

        informationRequirement.setParent(parent);
        retrieved = DMNCompilerImpl.getRootElement(elementReference);
        assertThat(retrieved).isNotNull().isEqualTo(parent);
    }