public List<String> collectErrorsFromAllNodes() {
    List<String> errors = new ArrayList<>();
    for (T node : mNodeResults.values()) {
      // add all the errors for this node, with the node appended to prefix
      for (String err : node.getErrors()) {
        errors.add(String.format("%s :%s", node.getBaseParameters().mId, err));
      }
    }
    return errors;
  }
@Test
  public void collectErrorFromAllNodesWithErrors() {
    // test summary with errors
    TestMultipleNodeSummary summary = new TestMultipleNodeSummary();

    summary.addTaskResultWithoutErrors(4);
    summary.addTaskResultWithErrors(3);

    List<String> list = summary.collectErrorsFromAllNodes();
    assertEquals(list.size(), 3);
    Set<String> set = new HashSet<>(list);
    for (int i = 4; i < 6; i++) {
      String message = String.format("task%s :error%s", i, i);
      assertTrue(set.contains(message));
    }
  }