### Question:
ItemDefinitionPropertyConverter { static QName wbTypeRefFromDMN(final org.kie.dmn.model.api.ItemDefinition dmn) { final QName wbQName = QNamePropertyConverter.wbFromDMN(dmn.getTypeRef(), dmn); final QName undefinedQName = BuiltInType.UNDEFINED.asQName(); return Objects.equals(wbQName, undefinedQName) ? null : wbQName; }  static ItemDefinition wbFromDMN(final org.kie.dmn.model.api.ItemDefinition dmn); static org.kie.dmn.model.api.ItemDefinition dmnFromWB(final ItemDefinition wb);  }### Answer:
@Test public void testWbTypeRefFromDMNWhenQNameIsUndefined() { final org.kie.dmn.model.api.ItemDefinition dmn = mock(org.kie.dmn.model.api.ItemDefinition.class); final javax.xml.namespace.QName dmnQName = null; when(dmn.getTypeRef()).thenReturn(dmnQName); final QName actualQName = wbTypeRefFromDMN(dmn); assertNull(actualQName); }
@Test public void testWbTypeRefFromDMNWhenQNameIsNotUndefined() { final String qNameLocalPart = "string"; final String qNamePrefix = "qName prefix"; final org.kie.dmn.model.api.ItemDefinition dmn = mock(org.kie.dmn.model.api.ItemDefinition.class); final javax.xml.namespace.QName dmnQName = mock(javax.xml.namespace.QName.class); final QName expectedQName = BuiltInType.STRING.asQName(); when(dmn.getTypeRef()).thenReturn(dmnQName); when(dmnQName.getLocalPart()).thenReturn(qNameLocalPart); when(dmnQName.getPrefix()).thenReturn(qNamePrefix); final QName actualQName = wbTypeRefFromDMN(dmn); assertEquals(actualQName, expectedQName); }