@Test
  public void testBasic() {
    JavaFileObject javaFileObject =
        JavaFileObjects.forSourceLines(
            "foo.bar.Baz",
            "package foo.bar;",
            "",
            "import com.google.auto.value.AutoValue;",
            "import com.google.annotations.GwtCompatible;",
            "",
            "@AutoValue",
            "@GwtCompatible(serializable = true)",
            "public abstract class Baz {",
            "  public abstract int buh();",
            "",
            "  public static Baz create(int buh) {",
            "    return new AutoValue_Baz(buh);",
            "  }",
            "}");
    JavaFileObject expectedOutput =
        JavaFileObjects.forSourceLines(
            "foo.bar.AutoValue_Baz_CustomFieldSerializer",
            "package foo.bar;",
            "",
            "import com.google.gwt.user.client.rpc.CustomFieldSerializer;",
            "import com.google.gwt.user.client.rpc.SerializationException;",
            "import com.google.gwt.user.client.rpc.SerializationStreamReader;",
            "import com.google.gwt.user.client.rpc.SerializationStreamWriter;",
            "import " + generatedAnnotationType() + ";",
            "",
            "@Generated(\"com.google.auto.value.processor.AutoValueProcessor\")",
            "public final class AutoValue_Baz_CustomFieldSerializer"
                + " extends CustomFieldSerializer<AutoValue_Baz> {",
            "",
            "  public static AutoValue_Baz instantiate(",
            "      SerializationStreamReader streamReader) throws SerializationException {",
            "    int buh = streamReader.readInt();",
            "    return new AutoValue_Baz(buh);",
            "  }",
            "",
            "  public static void serialize(",
            "      SerializationStreamWriter streamWriter,",
            "      AutoValue_Baz instance) throws SerializationException {",
            "    streamWriter.writeInt(instance.buh());",
            "  }",
            "",
            "  public static void deserialize(",
            "      @SuppressWarnings(\"unused\") SerializationStreamReader streamReader,",
            "      @SuppressWarnings(\"unused\") AutoValue_Baz instance) {",
            "  }",
            "",
            "  @SuppressWarnings(\"unused\") private int dummy_3f8e1b04;",
            "",
            "  @Override",
            "  public void deserializeInstance(",
            "      SerializationStreamReader streamReader,",
            "      AutoValue_Baz instance) {",
            "    deserialize(streamReader, instance);",
            "  }",
            "",
            "  @Override",
            "  public boolean hasCustomInstantiateInstance() {",
            "    return true;",
            "  }",
            "",
            "  @Override",
            "  public AutoValue_Baz instantiateInstance(",
            "      SerializationStreamReader streamReader) throws SerializationException {",
            "    return instantiate(streamReader);",
            "  }",
            "",
            "  @Override",
            "  public void serializeInstance(",
            "    SerializationStreamWriter streamWriter,",
            "    AutoValue_Baz instance) throws SerializationException {",
            "    serialize(streamWriter, instance);",
            "  }",
            "}");
    Compilation compilation =
        javac().withProcessors(new AutoValueProcessor()).compile(javaFileObject, GWT_COMPATIBLE);
    assertThat(compilation).succeededWithoutWarnings();
    assertThat(compilation)
        .generatedSourceFile("foo.bar.AutoValue_Baz_CustomFieldSerializer")
        .hasSourceEquivalentTo(expectedOutput);
  }
Test where the serialized properties don't include generics, so no {@code @SuppressWarnings}
annotation is needed. We explicitly check that one is not included anyway, because Eclipse for
example can be configured to complain about unnecessary warning suppression.
value/src/it/functional/src/test/java/com/google/auto/value/gwt/GwtCompilationTest.java