### Question:
SourceAndControlAssertionError extends AssertionError { @Override public String getMessage() { StringBuilder builder = new StringBuilder(); builder.append(super.getMessage()); appendMessage(builder, messageSource, messageLabel); appendMessage(builder, controlSource, controlLabel); return builder.toString(); } SourceAndControlAssertionError(String message, String messageLabel, Source messageSource, String controlLabel, Source controlSource); @Override String getMessage(); String getControlLabel(); Source getControlSource();  }### Answer:
@Test public void testMessages() { SourceAndControlAssertionError error = new SourceAndControlAssertionError("Test", "Message", new StringSource("<message/>"), "Control", new StringSource("<control/>")); assertEquals("Test\nMessage: <?xml version=\"1.0\" encoding=\"UTF-8\"?><message/>\nControl: <?xml version=\"1.0\" encoding=\"UTF-8\"?><control/>",error.getMessage()); }