### Question:
DRDContextMenu { public void appendContextMenuToTheDOM(final double x, final double y) { final HTMLElement contextMenuElement = contextMenu.getElement(); contextMenuElement.style.position = "absolute"; contextMenuElement.style.left = x + "px"; contextMenuElement.style.top = y + "px"; DomGlobal.document.body.appendChild(contextMenuElement); } @Inject  DRDContextMenu(final ContextMenu contextMenu,
                          final ClientTranslationService translationService,
                          final DRDContextMenuService drdContextMenuService,
                          final DMNDiagramsSession dmnDiagramsSession); String getTitle(); void appendContextMenuToTheDOM(final double x, final double y); void show(final Collection<Node<? extends Definition<?>, Edge>> selectedNodes); HTMLElement getElement();  }### Answer:
@Test public void testAppendContextMenuToTheDOM() { when(contextMenu.getElement()).thenReturn(element); Whitebox.setInternalState(element, "style", styleDeclaration); Whitebox.setInternalState(DomGlobal.class, "document", htmlDocument); Whitebox.setInternalState(htmlDocument, "body", body); drdContextMenu.appendContextMenuToTheDOM(10, 10); verify(body).appendChild(any(HTMLElement.class)); }