EmptyParameterDiagnosticCodec extends DiagnosticCodecSkeleton<String> { @Override public String serialize(Object o) throws DiagnosticCodecException { requireNonNull(o); return o.toString() + EOF; } EmptyParameterDiagnosticCodec(); @Override String serialize(Object o); @Override T deserialize(String encoded, Class<T> target); @Override String toString();  }
@Test public void test_serialize() { assertThat(codec.serialize(""), is(equalTo(EOF))); assertThat(codec.serialize(" "), is(equalTo(" " + EOF))); assertThat(codec.serialize("foo"), is(equalTo("foo" + EOF))); }