### Question:
DMNElementsSynchronizer { DRGElement getDRGElementFromContentDefinition(final Node node) { return ((DRGElement) ((Definition) node.getContent()).getDefinition()); } @Inject  DMNElementsSynchronizer(final DMNDiagramsSession dmnDiagramsSession,
                                   final Event<RefreshDecisionComponents> refreshDecisionComponentsEvent,
                                   final DMNGraphUtils graphUtils,
                                   final NodeTextSetter nodeTextSetter); void onExpressionEditorChanged(final @Observes ExpressionEditorChanged event); void onPropertyChanged(final @Observes FormFieldChanged event); void synchronizeElementsFrom(final DRGElement drgElement); void synchronizeFromNode(final Optional<Node> node);  }### Answer:
@Test public void testGetDRGElementFromContentDefinition() { final Node node = mock(Node.class); final Definition definition = mock(Definition.class); final DRGElement drgElement = mock(DRGElement.class); when(definition.getDefinition()).thenReturn(drgElement); when(node.getContent()).thenReturn(definition); final DRGElement actual = synchronizer.getDRGElementFromContentDefinition(node); assertEquals(drgElement, actual); }