AbstractFilter implements Filter { @Override public String encode() { StringBuffer buf = new StringBuffer(DEFAULT_BUFFER_SIZE); buf = encode(buf); return buf.toString(); }  @Override String encode(); @Override String toString();  }
@Test public void testEncode() { AbstractFilter af = new AbstractFilter() { public StringBuffer encode(StringBuffer buff) { return buff.append("foo"); } }; assertThat(af.encode()).isEqualTo("foo"); }