### Question:
TrimWhitespaceLambda implements Mustache.Lambda { @Override public void execute(Fragment fragment, Writer writer) throws IOException { writer.write(fragment.execute().replaceAll(WHITESPACE_REGEX, SINGLE_SPACE)); }  @Override void execute(Fragment fragment, Writer writer);  }### Answer:
@Test public void testTrimWhitespace() throws IOException { when(fragment.execute()).thenReturn("\t a b\t\tc \t"); StringWriter output = new StringWriter(); new TrimWhitespaceLambda().execute(fragment, output); assertEquals(output.toString(), " a b c "); }