### Question:
DMNMarshallerStandalone implements DiagramMarshaller<Graph, Metadata, Diagram<Graph, Metadata>> { void cleanImportedItemDefinitions(final Definitions definitions) { definitions.getItemDefinition().removeIf(ItemDefinition::isAllowOnlyVisualChange); } protected  DMNMarshallerStandalone(); @Inject  DMNMarshallerStandalone(final XMLEncoderDiagramMetadataMarshaller diagramMetadataMarshaller,
                                   final FactoryManager factoryManager,
                                   final DMNMarshallerImportsHelperStandalone dmnMarshallerImportsHelper,
                                   final DMNMarshaller marshaller); @Override @SuppressWarnings("unchecked") Graph unmarshall(final Metadata metadata,
                            final InputStream input); static Node<?, ?> findDMNDiagramRoot(final Graph<?, Node<View, ?>> graph); @SuppressWarnings({"rawtypes", "unchecked"}) static void connectRootWithChild(final Node dmnDiagramRoot,
                                            final Node child); @SuppressWarnings({"rawtypes", "unchecked"}) static void connectEdge(final Edge edge,
                                   final Node source,
                                   final Node target); @Override @SuppressWarnings("unchecked") String marshall(final Diagram<Graph, Metadata> diagram); @Override DiagramMetadataMarshaller<Metadata> getMetadataMarshaller(); static final String INFO_REQ_ID; static final String KNOWLEDGE_REQ_ID; static final String AUTH_REQ_ID; static final String ASSOCIATION_ID; }### Answer:
@Test public void testCleanImportedItemDefinitions() { final org.kie.workbench.common.dmn.api.definition.model.Definitions definitions = mock(org.kie.workbench.common.dmn.api.definition.model.Definitions.class); final org.kie.workbench.common.dmn.api.definition.model.ItemDefinition itemDefinition1 = mock(org.kie.workbench.common.dmn.api.definition.model.ItemDefinition.class); final org.kie.workbench.common.dmn.api.definition.model.ItemDefinition itemDefinition2 = mock(org.kie.workbench.common.dmn.api.definition.model.ItemDefinition.class); final org.kie.workbench.common.dmn.api.definition.model.ItemDefinition itemDefinition3 = mock(org.kie.workbench.common.dmn.api.definition.model.ItemDefinition.class); final List<org.kie.workbench.common.dmn.api.definition.model.ItemDefinition> actualItemDefinitions = new ArrayList<>(asList(itemDefinition1, itemDefinition2, itemDefinition3)); final List<org.kie.workbench.common.dmn.api.definition.model.ItemDefinition> expectedItemDefinitions = asList(itemDefinition1, itemDefinition3); final DMNMarshallerStandalone dmnMarshaller = getDMNMarshaller(); when(itemDefinition1.isAllowOnlyVisualChange()).thenReturn(false); when(itemDefinition2.isAllowOnlyVisualChange()).thenReturn(true); when(itemDefinition3.isAllowOnlyVisualChange()).thenReturn(false); when(definitions.getItemDefinition()).thenReturn(actualItemDefinitions); dmnMarshaller.cleanImportedItemDefinitions(definitions); assertEquals(expectedItemDefinitions, actualItemDefinitions); }