ShardCheckpoint implements Serializable { public String getShardIterator(SimplifiedKinesisClient kinesisClient) throws TransientKinesisException { if (checkpointIsInTheMiddleOfAUserRecord()) { return kinesisClient.getShardIterator( streamName, shardId, AT_SEQUENCE_NUMBER, sequenceNumber, null); } return kinesisClient.getShardIterator( streamName, shardId, shardIteratorType, sequenceNumber, timestamp); } ShardCheckpoint(String streamName, String shardId, StartingPoint startingPoint);  ShardCheckpoint(
      String streamName, String shardId, ShardIteratorType shardIteratorType, Instant timestamp);  ShardCheckpoint(
      String streamName,
      String shardId,
      ShardIteratorType shardIteratorType,
      String sequenceNumber,
      Long subSequenceNumber); private  ShardCheckpoint(
      String streamName,
      String shardId,
      ShardIteratorType shardIteratorType,
      String sequenceNumber,
      Long subSequenceNumber,
      Instant timestamp); boolean isBeforeOrAt(KinesisRecord other); @Override String toString(); String getShardIterator(SimplifiedKinesisClient kinesisClient); ShardCheckpoint moveAfter(KinesisRecord record); String getStreamName(); String getShardId();  }
@Test public void testProvidingShardIterator() throws IOException, TransientKinesisException { assertThat(checkpoint(AT_SEQUENCE_NUMBER, "100", null).getShardIterator(client)) .isEqualTo(AT_SEQUENCE_SHARD_IT); assertThat(checkpoint(AFTER_SEQUENCE_NUMBER, "100", null).getShardIterator(client)) .isEqualTo(AFTER_SEQUENCE_SHARD_IT); assertThat(checkpoint(AT_SEQUENCE_NUMBER, "100", 10L).getShardIterator(client)) .isEqualTo(AT_SEQUENCE_SHARD_IT); assertThat(checkpoint(AFTER_SEQUENCE_NUMBER, "100", 10L).getShardIterator(client)) .isEqualTo(AT_SEQUENCE_SHARD_IT); }