@Test
public void should_write_error_type_and_message_as_attributes() {
final String errorMsg = "Thrown on purpose";
final Exception e = new Exception(errorMsg);
new EasyMockTemplate(targetNode) {
@Override protected void expectations() {
targetNode.addAttribute(name(ATTR_MESSAGE).value(errorMsg));
expectLastCall().once();
targetNode.addAttribute(name(ATTR_TYPE).value(Exception.class.getName()));
expectLastCall().once();