CompositeOperation implements Neo4JOperation { @Override public void execute(final Connection connection, final Graph<Node, Edge> graph) throws SQLException { for (final Neo4JOperation operation : operations) { operation.execute(connection, graph); } } CompositeOperation(final Neo4JOperation... operations); @Override void execute(final Connection connection, final Graph<Node, Edge> graph);  }
@Test public void testOperationExecution() throws SQLException { final Graph<Node, Edge> graph = new DefaultDirectedGraph<>(new ClassBasedEdgeFactory<>(Edge.class)); final CompositeOperation operation = new CompositeOperation(operation1, operation2, operation3); operation.execute(connection, graph); final InOrder order = inOrder(operation1, operation2, operation3); order.verify(operation1).execute(eq(connection), eq(graph)); order.verify(operation2).execute(eq(connection), eq(graph)); order.verify(operation3).execute(eq(connection), eq(graph)); }