AliasMessage implements Message { public Builder toBuilder() { return new Builder(this); }  static Builder builder(String previousId); abstract String previousId(); Builder toBuilder();  }
@Test public void toBuilder() { AliasMessage original = AliasMessage.builder("previousId").userId("userId").build(); AliasMessage copy = original.toBuilder().build(); assertThat(copy.previousId()).isEqualTo("previousId"); }