code: void write(CallInfo callInfo, DataSetAssertion assertion) {
      Element rootNode = root(callInfo); 
      DataSource ds = assertion.getSource();
      write(rootNode, ds);
      Element saNode = createNode(rootNode, ASSERTION_TAG);
      List<MetaData.ColumnInfo> mdCols = ds.getMetaData().columns();
      write(saNode, 
          EXPECTED_TAG, 
          mdCols,
          assertion.data(DataSetAssertion.IteratorType.EXPECTED_DATA));
      if (! assertion.passed()) {
        Element errorsNode = createNode(saNode, ERRORS_TAG);
        write(errorsNode, 
            EXPECTED_TAG, 
            mdCols,
            assertion.data(DataSetAssertion.IteratorType.ERRORS_EXPECTED));
        write(errorsNode, 
            ACTUAL_TAG, 
            mdCols,
            assertion.data(DataSetAssertion.IteratorType.ERRORS_ACTUAL));
      }
      flush(rootNode);
    }
docs: Log state assertion.
  @param callInfo Call info.
  @param assertion State assertion.