@Test public void testDependencyExceptionInConsumerCreation() throws Exception { FanOutConfig config = new TestingConfig(kinesisClient).applicationName(TEST_APPLICATION_NAME) .streamName(TEST_STREAM_NAME); DependencyException de = new DependencyException("Bad", null); when(consumerRegistration.getOrCreateStreamConsumerArn()).thenThrow(de); try { config.retrievalFactory(); } catch (RuntimeException e) { verify(consumerRegistration).getOrCreateStreamConsumerArn(); assertThat(e.getCause(), equalTo(de)); } }
@Override public RetrievalFactory retrievalFactory() { return new FanOutRetrievalFactory(kinesisClient, streamName, consumerArn, this::getOrCreateConsumerArn); }
FanOutConfig implements RetrievalSpecificConfig { @Override public RetrievalFactory retrievalFactory() { return new FanOutRetrievalFactory(kinesisClient, streamName, consumerArn, this::getOrCreateConsumerArn); } }
FanOutConfig implements RetrievalSpecificConfig { @Override public RetrievalFactory retrievalFactory() { return new FanOutRetrievalFactory(kinesisClient, streamName, consumerArn, this::getOrCreateConsumerArn); }  }
FanOutConfig implements RetrievalSpecificConfig { @Override public RetrievalFactory retrievalFactory() { return new FanOutRetrievalFactory(kinesisClient, streamName, consumerArn, this::getOrCreateConsumerArn); }  @Override RetrievalFactory retrievalFactory(); }
FanOutConfig implements RetrievalSpecificConfig { @Override public RetrievalFactory retrievalFactory() { return new FanOutRetrievalFactory(kinesisClient, streamName, consumerArn, this::getOrCreateConsumerArn); }  @Override RetrievalFactory retrievalFactory();  }