### Question:
QNamePropertyConverter { public static String getDefaultNamespace(final DMNModelInstrumentedBase parent) { if (parent instanceof TDefinitions) { final TDefinitions def = (TDefinitions) parent; return def.getNamespace(); } else if (!Objects.isNull(parent.getParent())) { return getDefaultNamespace(parent.getParent()); } return ""; }  static QName wbFromDMN(final javax.xml.namespace.QName qName, final DMNModelInstrumentedBase parent); static void setDMNfromWB(final QName qname,
                                    final Consumer<javax.xml.namespace.QName> setter); static Optional<javax.xml.namespace.QName> dmnFromWB(final QName wb); static String getDefaultNamespace(final DMNModelInstrumentedBase parent);  }### Answer:
@Test public void testGetDefaultNamespace() { final String defaultNamespace = "http: final TDefinitions definition = mock(TDefinitions.class); when(definition.getNamespace()).thenReturn(defaultNamespace); final String actual = QNamePropertyConverter.getDefaultNamespace(definition); assertEquals(defaultNamespace, actual); }
@Test public void testGetDefaultNamespaceFromParent() { final String defaultNamespace = "http: final TDefinitions definition = mock(TDefinitions.class); final DMNModelInstrumentedBase model = mock(DMNModelInstrumentedBase.class); when(model.getParent()).thenReturn(definition); when(definition.getNamespace()).thenReturn(defaultNamespace); final String actual = QNamePropertyConverter.getDefaultNamespace(model); assertEquals(defaultNamespace, actual); }