### Question:
DockingAcceptorControlImpl extends AbstractAcceptorControl implements DockingAcceptorControl<AbstractCanvasHandler> { @Override public boolean allow(final Node parent, final Node child) { return evaluate(parent, child, command -> getCommandManager().allow(getCanvasHandler(), command)); } @Inject  DockingAcceptorControlImpl(final CanvasCommandFactory<AbstractCanvasHandler> canvasCommandFactory); @Override boolean allow(final Node parent,
                         final Node child); @Override boolean accept(final Node parent,
                          final Node child);  }### Answer:
@Test public void testAllow() { tested.init(canvasHandler); final boolean allow = tested.allow(source, docked); assertTrue(allow); verify(commandManager, times(1)).allow(eq(canvasHandler), eq(updateDockNodeCommand)); assertEquals(source, updateDockNodeCommand.getParent()); assertEquals(docked, updateDockNodeCommand.getCandidate()); }
@Test public void testAllowNoParent() { tested.init(canvasHandler); final boolean allow = tested.allow(null, docked); assertFalse(allow); verify(commandManager, times(0)).allow(any(AbstractCanvasHandler.class), any(UpdateDockNodeCommand.class)); }