### Question:
ItemDefinitionPropertyConverter { public static ItemDefinition wbFromDMN(final org.kie.dmn.model.api.ItemDefinition dmn) { if (dmn == null) { return null; } final Id id = new Id(dmn.getId()); final Name name = new Name(dmn.getName()); final Description description = wbDescriptionFromDMN(dmn); final QName typeRef = wbTypeRefFromDMN(dmn); final String typeLanguage = dmn.getTypeLanguage(); final boolean isCollection = dmn.isIsCollection(); final ItemDefinition wb = new ItemDefinition(id, description, name, typeRef, null, null, typeLanguage, isCollection, false); setUnaryTests(wb, dmn); setItemComponent(wb, dmn); return wb; }  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 testWbFromDMNWhenDMNIsNull() { assertNull(wbFromDMN(null)); }
@Test public void testWbFromDMNWhenDMNIsNotNull() { final org.kie.dmn.model.api.ItemDefinition dmn = mock(org.kie.dmn.model.api.ItemDefinition.class); final String id = "id"; final String name = "name"; final Id expectedId = new Id(id); final Name expectedName = new Name(name); final String expectedTypeLanguage = "typeLanguage"; final boolean expectedIsCollection = true; final String description = "description"; final boolean expectedAllowOnlyVisualChange = false; final String qNameNamespaceURI = "qName namespaceURI"; final String qNameLocalPart = "qName local part"; final String qNamePrefix = "qName prefix"; final Description expectedDescription = new Description(description); final javax.xml.namespace.QName expectedTypeRef = new javax.xml.namespace.QName(qNameNamespaceURI, qNameLocalPart, qNamePrefix); when(dmn.getId()).thenReturn(id); when(dmn.getName()).thenReturn(name); when(dmn.getTypeLanguage()).thenReturn(expectedTypeLanguage); when(dmn.isIsCollection()).thenReturn(expectedIsCollection); when(dmn.getDescription()).thenReturn(description); when(dmn.getTypeRef()).thenReturn(expectedTypeRef); final ItemDefinition actualItemDefinition = wbFromDMN(dmn); final Id actualId = actualItemDefinition.getId(); final Name actualName = actualItemDefinition.getName(); final String actualTypeLanguage = actualItemDefinition.getTypeLanguage(); final boolean actualIsCollection = actualItemDefinition.isIsCollection(); final Description actualDescription = actualItemDefinition.getDescription(); final QName actualTypeRef = actualItemDefinition.getTypeRef(); final boolean actualAllowOnlyVisualChange = actualItemDefinition.isAllowOnlyVisualChange(); assertEquals(expectedId, actualId); assertEquals(expectedName, actualName); assertEquals(expectedTypeLanguage, actualTypeLanguage); assertEquals(expectedIsCollection, actualIsCollection); assertEquals(expectedDescription, actualDescription); assertEquals(expectedAllowOnlyVisualChange, actualAllowOnlyVisualChange); assertEquals(expectedTypeRef.getLocalPart(), actualTypeRef.getLocalPart()); assertEquals(expectedTypeRef.getPrefix(), actualTypeRef.getPrefix()); assertEquals(expectedTypeRef.getNamespaceURI(), actualTypeRef.getNamespaceURI()); }