services/kinesis/src/it/java/software/amazon/awssdk/services/kinesis/SubscribeToShardIntegrationTest.java [152:177]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        AtomicBoolean onCompleteSubsMethodsCalled = new AtomicBoolean(false);
        AtomicBoolean completeMethodOfHandlerCalled = new AtomicBoolean(false);
        AtomicBoolean errorOccurred = new AtomicBoolean(false);
        List<SubscribeToShardEventStream> events = new ArrayList<>();
        asyncClient.subscribeToShard(r -> r.consumerARN(consumerArn)
                                           .shardId(shardId)
                                           .startingPosition(s -> s.type(ShardIteratorType.LATEST)),
                                     new SubscribeToShardResponseHandler() {
                                         @Override
                                         public void responseReceived(SubscribeToShardResponse response) {
                                             verifyHttpMetadata(response);
                                         }

                                         @Override
                                         public void onEventStream(SdkPublisher<SubscribeToShardEventStream> publisher) {
                                             publisher.limit(3).subscribe(new Subscriber<SubscribeToShardEventStream>() {
                                                 private Subscription subscription;
                                                 @Override
                                                 public void onSubscribe(Subscription subscription) {
                                                     this.subscription = subscription;
                                                     subscription.request(10);
                                                 }

                                                 @Override
                                                 public void onNext(SubscribeToShardEventStream subscribeToShardEventStream) {
                                                     events.add(subscribeToShardEventStream);
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



services/kinesis/src/it/java/software/amazon/awssdk/services/kinesis/SubscribeToShardIntegrationTest.java [218:243]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        AtomicBoolean onCompleteSubsMethodsCalled = new AtomicBoolean(false);
        AtomicBoolean completeMethodOfHandlerCalled = new AtomicBoolean(false);
        AtomicBoolean errorOccurred = new AtomicBoolean(false);
        List<SubscribeToShardEventStream> events = new ArrayList<>();
        asyncClient.subscribeToShard(r -> r.consumerARN(consumerArn)
                                           .shardId(shardId)
                                           .startingPosition(s -> s.type(ShardIteratorType.LATEST)),
                                     new SubscribeToShardResponseHandler() {
                                         @Override
                                         public void responseReceived(SubscribeToShardResponse response) {
                                             verifyHttpMetadata(response);
                                         }

                                         @Override
                                         public void onEventStream(SdkPublisher<SubscribeToShardEventStream> publisher) {
                                             publisher.limit(3).subscribe(new Subscriber<SubscribeToShardEventStream>() {
                                                 private Subscription subscription;
                                                 @Override
                                                 public void onSubscribe(Subscription subscription) {
                                                     this.subscription = subscription;
                                                     subscription.request(10);
                                                 }

                                                 @Override
                                                 public void onNext(SubscribeToShardEventStream subscribeToShardEventStream) {
                                                     events.add(subscribeToShardEventStream);
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



