public static Builder newBuilder() {
    return new Builder();
  }
@Test
  public void testBuilderDefaultsToCommitTimestampWhenCreatedAtIsNotGiven() {
    PartitionMetadata expectedPartitionMetadata =
        new PartitionMetadata(
            PARTITION_TOKEN,
            Sets.newHashSet(PARENT_TOKEN),
            START_TIMESTAMP,
            END_TIMESTAMP,
            10,
            State.RUNNING,
            WATERMARK,
            Value.COMMIT_TIMESTAMP,
            SCHEDULED_AT,
            RUNNING_AT,
            FINISHED_AT);
    PartitionMetadata actualPartitionMetadata =
        PartitionMetadata.newBuilder()
            .setPartitionToken(PARTITION_TOKEN)
            .setParentTokens(Sets.newHashSet(PARENT_TOKEN))
            .setStartTimestamp(START_TIMESTAMP)
            .setEndTimestamp(END_TIMESTAMP)
            .setHeartbeatMillis(10)
            .setState(State.RUNNING)
            .setWatermark(WATERMARK)
            .setScheduledAt(SCHEDULED_AT)
            .setRunningAt(RUNNING_AT)
            .setFinishedAt(FINISHED_AT)
            .build();
    assertEquals(expectedPartitionMetadata, actualPartitionMetadata);
  }