@Test public void undo() throws Exception { cloneConnectorCommand.execute(graphCommandExecutionContext); cloneConnectorCommand.undo(graphCommandExecutionContext); verify(graphIndex, times(1)).removeEdge(cloneEdge); }
@Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> undo(final GraphCommandExecutionContext context) { return new DeleteConnectorCommand(clone).execute(context); }
CloneConnectorCommand extends AbstractGraphCompositeCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> undo(final GraphCommandExecutionContext context) { return new DeleteConnectorCommand(clone).execute(context); } }
CloneConnectorCommand extends AbstractGraphCompositeCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> undo(final GraphCommandExecutionContext context) { return new DeleteConnectorCommand(clone).execute(context); } CloneConnectorCommand();  CloneConnectorCommand(final @MapsTo("candidate") Edge candidate, final @MapsTo("sourceNodeUUID") String sourceNodeUUID, final @MapsTo("targetNodeUUID") String targetNodeUUID);  CloneConnectorCommand(Edge candidate, String sourceNodeUUID, String targetNodeUUID, Consumer<Edge> callback); }
CloneConnectorCommand extends AbstractGraphCompositeCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> undo(final GraphCommandExecutionContext context) { return new DeleteConnectorCommand(clone).execute(context); } CloneConnectorCommand();  CloneConnectorCommand(final @MapsTo("candidate") Edge candidate, final @MapsTo("sourceNodeUUID") String sourceNodeUUID, final @MapsTo("targetNodeUUID") String targetNodeUUID);  CloneConnectorCommand(Edge candidate, String sourceNodeUUID, String targetNodeUUID, Consumer<Edge> callback); @Override CommandResult<RuleViolation> execute(GraphCommandExecutionContext context); @Override @SuppressWarnings("unchecked") CommandResult<RuleViolation> undo(final GraphCommandExecutionContext context); }
CloneConnectorCommand extends AbstractGraphCompositeCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> undo(final GraphCommandExecutionContext context) { return new DeleteConnectorCommand(clone).execute(context); } CloneConnectorCommand();  CloneConnectorCommand(final @MapsTo("candidate") Edge candidate, final @MapsTo("sourceNodeUUID") String sourceNodeUUID, final @MapsTo("targetNodeUUID") String targetNodeUUID);  CloneConnectorCommand(Edge candidate, String sourceNodeUUID, String targetNodeUUID, Consumer<Edge> callback); @Override CommandResult<RuleViolation> execute(GraphCommandExecutionContext context); @Override @SuppressWarnings("unchecked") CommandResult<RuleViolation> undo(final GraphCommandExecutionContext context);  }