public static Builder newBuilder() {
    return new Builder();
  }
@Test
  public void testBuilderThrowsExceptionWhenHeartbeatMillisMissing() {
    assertThrows(
        "heartbeatMillis",
        IllegalStateException.class,
        () ->
            PartitionMetadata.newBuilder()
                .setPartitionToken(PARTITION_TOKEN)
                .setParentTokens(Sets.newHashSet(PARENT_TOKEN))
                .setStartTimestamp(START_TIMESTAMP)
                .setEndTimestamp(END_TIMESTAMP)
                .setState(State.CREATED)
                .setWatermark(WATERMARK)
                .setCreatedAt(CREATED_AT)
                .build());
  }