@Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    ShardCheckpoint that = (ShardCheckpoint) o;
    return streamName.equals(that.streamName)
        && shardId.equals(that.shardId)
        && Objects.equals(sequenceNumber, that.sequenceNumber)
        && shardIteratorType == that.shardIteratorType
        && Objects.equals(subSequenceNumber, that.subSequenceNumber)
        && Objects.equals(timestamp, that.timestamp);
  }
@Test
  public void testEquals() {
    assertEquals(
        new ShardCheckpoint("stream-01", "shard-000", new StartingPoint(Instant.ofEpochMilli(112))),
        new ShardCheckpoint(
            "stream-01", "shard-000", new StartingPoint(Instant.ofEpochMilli(112))));

    assertEquals(
        new ShardCheckpoint(
            "stream-01", "shard-000", ShardIteratorType.AFTER_SEQUENCE_NUMBER, "9", 0L),
        new ShardCheckpoint(
            "stream-01", "shard-000", ShardIteratorType.AFTER_SEQUENCE_NUMBER, "9", 0L));
    assertNotEquals(
        new ShardCheckpoint(
            "stream-01", "shard-000", ShardIteratorType.AFTER_SEQUENCE_NUMBER, "10", 0L),
        new ShardCheckpoint(
            "stream-01", "shard-000", ShardIteratorType.AFTER_SEQUENCE_NUMBER, "9", 0L));

    assertNotEquals(
        new ShardCheckpoint("stream-01", "shard-000", new StartingPoint(Instant.ofEpochMilli(112))),
        new ShardCheckpoint(
            "stream-01", "shard-000", new StartingPoint(Instant.ofEpochMilli(113))));
  }