### Question:
ErrorFormatterWithFirstErrorStackTrace implements ErrorFormatter { @Override public String format(ViewInflationErrors inflationError) { ErrorMessageBuilder errorMessageBuilder = new ErrorMessageBuilder(inflationError); return errorMessageBuilder.build(); }  @Override String format(ViewInflationErrors inflationError);  }### Answer:
@Test public void whenFormatAGivenInflationError_thenReceivedAnExpectedMessage() { ErrorFormatter errorFormatter = new ErrorFormatterWithFirstErrorStackTrace(); String message = errorFormatter.format(aViewInflationErrors("CustomView").withAttributeResolutionErrorOf("text", "invalid syntax ${prop1") .withMissingRequiredAttributesResolutionErrorOf("source", "dropdownLayout") .withAttributeBindingErrorOf("visibility", "unmatch presentationModel.prop2 type").build()); assertThat(message, containsString("CustomView(3 errors)")); assertThat(message, containsString("text: invalid syntax ${prop1")); assertThat(message, containsString("Missing attributes: source, dropdownLayout")); assertThat(message, containsString("visibility: unmatch presentationModel.prop2 type")); assertThat(message, containsString("The first error stack trace")); }