PrettySerializer extends Serializer { public PrettySerializer config() { return new PrettySerializer(indent, space, newline, entrySep, strict, true); } PrettySerializer();  PrettySerializer(boolean strict); private  PrettySerializer(String indent,
                             String space,
                             String newline,
                             String entrySep,
                             boolean strict,
                             boolean prefixWithQualifiedName); PrettySerializer compact(); PrettySerializer string(); PrettySerializer config(); int serialize(@Nonnull OutputStream out, @Nonnull Message message); @Override int serialize(@Nonnull OutputStream out, @Nonnull PServiceCall<Message, Field> call); @Nonnull @Override @SuppressWarnings("unchecked") PServiceCall<Message, Field> deserialize(@Nonnull InputStream input, @Nonnull PService service); @Nonnull @Override Message deserialize(@Nonnull InputStream input,
                        @Nonnull PMessageDescriptor<Message, Field> descriptor); @Override boolean binaryProtocol(); @Nonnull @Override String mediaType(); final static String MEDIA_TYPE; }
@Test public void testConfig() throws IOException { PrettySerializer serializer = new PrettySerializer().config(); Containers containers = generator.generate(Containers.kDescriptor); ByteArrayOutputStream out = new ByteArrayOutputStream(); serializer.serialize(out, containers); ByteArrayInputStream in = new ByteArrayInputStream(out.toByteArray()); Containers res = serializer.deserialize(in, Containers.kDescriptor); assertThat(res, is(containers)); }