@Test
public void testComparablePeriod() {

    final DMNRuntime runtime = createRuntime("comparablePeriod.dmn", this.getClass());
    final DMNModel dmnModel = runtime.getModel("https://kiegroup.org/dmn/_CB283B9C-8581-447E-8625-4D1186F0B3A6", "A1B0FA02-D1C4-4386-AF36-0280AA45A7B7");
    assertThat(dmnModel, notNullValue());
    final DMNContext context = runtime.newContext();
    final DMNResult evaluateAll = evaluateModel(runtime, dmnModel, context);
    LOG.debug("{}", evaluateAll);
    assertThat(DMNRuntimeUtil.formatMessages(evaluateAll.getMessages()), evaluateAll.hasErrors(), is(false));
    assertThat(evaluateAll.getDecisionResultByName("Decision-1").getResult(), is(ComparablePeriod.parse("P3Y")));
    final Object serialized = MarshallingStubUtils.stubDMNResult(evaluateAll.getContext().getAll(), Object::toString);
    LOG.debug("{}", serialized);
    assertThat(serialized, instanceOf(Map.class));
    @SuppressWarnings("unchecked")
    Map<String, Object> asMap = (Map<String, Object>) serialized;
    assertThat(asMap.get("BKM"), instanceOf(String.class));
    assertThat(asMap.get("Decision-1"), instanceOf(java.time.Period.class));
    assertThat(asMap.get("Decision-1"), is(java.time.Period.parse("P3Y")));
}