AlphabeticalSortedWrapper implements Wrapper<Element> { @Override public String toString() { return "AlphabeticalSortedWrapper{" + "element=" + element + '}'; } AlphabeticalSortedWrapper(final Element element); @Override Element getContent(); @Override boolean isBefore(final Wrapper<? extends Content> wrapper); @Override String toString();  }
@Test void toStringWithIndentShouldWork() { assertThat(new AlphabeticalSortedWrapper(new Element("Gurka")).toString(" "), is(" AlphabeticalSortedWrapper{element=[Element: <Gurka/>]}")); assertThat(new AlphabeticalSortedWrapper(null).toString(" "), is(" AlphabeticalSortedWrapper{element=null}")); }