### Question:
InformationItemPrimaryPropertyConverter { public static InformationItemPrimary wbFromDMN(final InformationItem dmn, final org.kie.dmn.model.api.DMNModelInstrumentedBase parent) { if (dmn == null) { return null; } final Id id = new Id(dmn.getId()); final Name name = new Name(getParentName(parent)); final QName typeRef = QNamePropertyConverter.wbFromDMN(dmn.getTypeRef(), dmn); return new InformationItemPrimary(id, name, typeRef); }  static InformationItemPrimary wbFromDMN(final InformationItem dmn,
                                                   final org.kie.dmn.model.api.DMNModelInstrumentedBase parent); static TInformationItem dmnFromWB(final InformationItemPrimary wb,
                                             final DMNModelInstrumentedBase parent);  }### Answer:
@Test public void testWbFromDMNWhenDMNIsNull() { final InformationItem dmn = null; final InformationItemPrimary informationItemPrimary = InformationItemPrimaryPropertyConverter.wbFromDMN(dmn, dmn); assertNull(informationItemPrimary); }
@Test public void testWbFromDMNWhenDMNIsNotNull() { final String id = "id"; final Id expectedId = new Id(id); final String qNameNamespaceURI = "qName namespaceURI"; final String qNameLocalPart = "qName local part"; final String qNamePrefix = "qName prefix"; final QName expectedTypeRef = new QName(qNameNamespaceURI, qNameLocalPart, qNamePrefix); final javax.xml.namespace.QName qName = mock(javax.xml.namespace.QName.class); final org.kie.dmn.model.api.InformationItem dmn = mock(org.kie.dmn.model.api.InformationItem.class); when(dmn.getId()).thenReturn(id); when(dmn.getTypeRef()).thenReturn(qName); when(qName.getNamespaceURI()).thenReturn(qNameNamespaceURI); when(qName.getLocalPart()).thenReturn(qNameLocalPart); when(qName.getPrefix()).thenReturn(qNamePrefix); final InformationItemPrimary informationItemPrimary = InformationItemPrimaryPropertyConverter.wbFromDMN(dmn, dmn); final Id actualId = informationItemPrimary.getId(); final QName actualTypeRef = informationItemPrimary.getTypeRef(); assertEquals(expectedId, actualId); assertEquals(expectedTypeRef, actualTypeRef); }