@Test
public void testActionRequestsWithDifferingChildrenAreDuplicates() throws Exception {

    List<ActionRequestValue> actionRequestValues = new ArrayList<ActionRequestValue>();
    List<ActionRequestValue> firstChildren = new ArrayList<ActionRequestValue>();
    firstChildren.add(getActionRequest());
    ActionRequestValue firstActionRequest = getActionRequest();
    firstActionRequest.setChildrenRequests(firstChildren);
    actionRequestValues.add(firstActionRequest);
    ActionRequestValue secondActionRequest = getActionRequest();
    List<ActionRequestValue> secondChildren = new ArrayList<ActionRequestValue>();
    ActionRequestValue differingActionRequest = getActionRequest();
    differingActionRequest.setPrincipalId("otherPrincipal");
    secondChildren.add(differingActionRequest);
    secondActionRequest.setChildrenRequests(secondChildren);
    actionRequestValues.add(secondActionRequest);
    when(routeModule.findActionRequests(routeContext)).thenReturn(actionRequestValues);
    List<ActionRequestValue> deduplicatedActionRequestValues = requestsNode.getNewActionRequests(routeContext);
    assertEquals(2, deduplicatedActionRequestValues.size());
}