@Test
  public void serializeMemoize() {
    SerializeMemoize instance1 = SerializeMemoize.builder().setNumber(Optional.of(17)).build();
    assertThat(instance1.methodCount).isEqualTo(0);
    assertThat(instance1.negate()).hasValue(-17);
    assertThat(instance1.methodCount).isEqualTo(1);
    assertThat(instance1.negate()).hasValue(-17);
    assertThat(instance1.methodCount).isEqualTo(1);
    SerializeMemoize instance2 = SerializableTester.reserialize(instance1);
    assertThat(instance2.methodCount).isEqualTo(0);
    assertThat(instance2.negate()).hasValue(-17);
    assertThat(instance2.methodCount).isEqualTo(1);
    assertThat(instance2.negate()).hasValue(-17);
    assertThat(instance2.methodCount).isEqualTo(1);
  }
Type that uses both {@code @SerializableAutoValue} and {@code @Memoized}, showing that the two
extensions work correctly together.
value/src/test/java/com/google/auto/value/extension/serializable/processor/SerializableAutoValueExtensionTest.java