### Question:
Plain implements Formatted { @Override public Text formatted() { return this.glossary.definitions() .sorted() .map(Definition::text) .reduce((formatted, definition) -> new Joined( new TextOf(System.lineSeparator()), formatted, definition )).orElse(new TextOf("No definitions found.")); } Plain(final @NonNull Glossary glossary); @Override Text formatted();  }### Answer:
@Test public void emptyGlossaryCanBeFormatted() { Assertions.assertThat( new Plain( new EmptyGlossary() ).formatted() ).isEqualTo( new TextOf("No definitions found.") ); }
@Test public void glossaryCanBeFormatted() { Assertions.assertThat( new Plain( new SimpleCodingGlossary() ).formatted() ).isEqualTo( new TextOf( "Author: The originator or creator of a work.\n" + "Code: Instructions for a computer." ) ); }