### Question:
QueueGraphExecutionContext extends AbstractGraphCommandExecutionContext { @Override public RuleViolations evaluate(final GraphEvaluationContext context) { ((AbstractGraphEvaluationContext) context).setState(this::getState); return StatefulGraphEvaluationContexts.evaluate(context, c -> ruleManager.evaluate(ruleSet, c)); } QueueGraphExecutionContext(final DefinitionManager definitionManager,
                                      final FactoryManager factoryManager,
                                      final RuleManager ruleManager,
                                      final Index<?, ?> graphIndex,
                                      final RuleSet ruleSet);   QueueGraphExecutionContext(final DefinitionManager definitionManager,
                               final FactoryManager factoryManager,
                               final RuleManager ruleManager,
                               final RuleEvaluationContextBuilder.StatefulGraphContextBuilder contextBuilder,
                               final Index<?, ?> graphIndex,
                               final RuleSet ruleSet); void clear(); @Override RuleViolations evaluate(final GraphEvaluationContext context); @Override RuleSet getRuleSet(); void addElement(final Element candidate); List<Element> getUpdatedElements(); void resetUpdatedElements();  }### Answer:
@Test @SuppressWarnings("unchecked") public void testEvaluate() { StatefulGraphEvaluationState.StatefulContainmentState containmentState = new StatefulGraphEvaluationState.StatefulContainmentState(); when(state.getContainmentState()).thenReturn(containmentState); Element parent = new NodeImpl<>("parent"); Node child = new NodeImpl<>("child"); final NodeContainmentContext[] containmentContext = new NodeContainmentContext[1]; tested.evaluate(builder -> containmentContext[0] = builder.containment(parent, child)); verify(ruleManager, times(1)).evaluate(eq(ruleSet), eq(containmentContext[0])); assertEquals(parent, containmentState.getParent(child)); }