public void should_write_test_execution_when_test_fails() {
startSuite();
junit.framework.Test test = mockTest();
AssertionFailedError error = errorOrFailure();
formatter.addFailure(test, error);
XmlNode root = root();
assertThatTestCaseNodeWasAddedTo(root);
XmlNode failureNode = firstTestCaseNodeIn(root).child(0);
assertThat(failureNode.name()).isEqualTo("failure");
assertThatErrorOrFailureWasWrittenTo(failureNode);
assertThat(formatter.onFailureOrErrorMethod).wasCalledPassing(test, error, failureNode);
}