### Question:
UndoableLayoutExecutor implements LayoutExecutor { @SuppressWarnings("Duplicates") @Override public void applyLayout(final Layout layout, final Graph graph) { if (layout.getNodePositions().size() == 0) { return; } final CompositeCommand command = createCommand(layout, graph); commandManager.execute(canvasHandler, command); } UndoableLayoutExecutor(final AbstractCanvasHandler canvasHandler,
                                  final CanvasCommandManager<AbstractCanvasHandler> commandManager); @SuppressWarnings("Duplicates") @Override void applyLayout(final Layout layout, final Graph graph); AbstractCanvasHandler getCanvasHandler(); CanvasCommandManager<AbstractCanvasHandler> getCommandManager();  }### Answer:
@Test public void testApplyLayout() { executor.applyLayout(layout, graph); verify(executor).createCommand(layout, graph); verify(commandManager).execute(any(), any()); }