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);
  }
@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);
  }