@Test public void testAllConfigurationTransits() { FanoutConfigBean fanoutConfigBean = new FanoutConfigBean(); fanoutConfigBean.setConsumerArn("consumer-arn"); fanoutConfigBean.setConsumerName("consumer-name"); fanoutConfigBean.setMaxDescribeStreamConsumerRetries(10); fanoutConfigBean.setMaxDescribeStreamSummaryRetries(20); fanoutConfigBean.setRegisterStreamConsumerRetries(30); fanoutConfigBean.setRetryBackoffMillis(1000); ConvertUtilsBean convertUtilsBean = new ConvertUtilsBean(); BeanUtilsBean utilsBean = new BeanUtilsBean(convertUtilsBean); MultiLangDaemonConfiguration configuration = new MultiLangDaemonConfiguration(utilsBean, convertUtilsBean); configuration.setStreamName("test-stream"); configuration.setApplicationName("test-application"); FanOutConfig fanOutConfig =fanoutConfigBean.build(kinesisAsyncClient, configuration); assertThat(fanOutConfig.kinesisClient(), equalTo(kinesisAsyncClient)); assertThat(fanOutConfig.streamName(), equalTo(configuration.getStreamName())); assertThat(fanOutConfig.applicationName(), equalTo(configuration.getApplicationName())); assertThat(fanOutConfig.consumerArn(), equalTo(fanoutConfigBean.getConsumerArn())); assertThat(fanOutConfig.consumerName(), equalTo(fanoutConfigBean.getConsumerName())); assertThat(fanOutConfig.maxDescribeStreamConsumerRetries(), equalTo(fanoutConfigBean.getMaxDescribeStreamConsumerRetries())); assertThat(fanOutConfig.maxDescribeStreamSummaryRetries(), equalTo(fanoutConfigBean.getMaxDescribeStreamSummaryRetries())); assertThat(fanOutConfig.registerStreamConsumerRetries(), equalTo(fanoutConfigBean.getRegisterStreamConsumerRetries())); assertThat(fanOutConfig.retryBackoffMillis(), equalTo(fanoutConfigBean.getRetryBackoffMillis())); }
@Override public FanOutConfig build(KinesisAsyncClient kinesisAsyncClient, MultiLangDaemonConfiguration parent) { return ConfigurationSettableUtils.resolveFields(this, new FanOutConfig(kinesisAsyncClient).applicationName(parent.getApplicationName()) .streamName(parent.getStreamName())); }
FanoutConfigBean implements RetrievalConfigBuilder { @Override public FanOutConfig build(KinesisAsyncClient kinesisAsyncClient, MultiLangDaemonConfiguration parent) { return ConfigurationSettableUtils.resolveFields(this, new FanOutConfig(kinesisAsyncClient).applicationName(parent.getApplicationName()) .streamName(parent.getStreamName())); } }
FanoutConfigBean implements RetrievalConfigBuilder { @Override public FanOutConfig build(KinesisAsyncClient kinesisAsyncClient, MultiLangDaemonConfiguration parent) { return ConfigurationSettableUtils.resolveFields(this, new FanOutConfig(kinesisAsyncClient).applicationName(parent.getApplicationName()) .streamName(parent.getStreamName())); }  }
FanoutConfigBean implements RetrievalConfigBuilder { @Override public FanOutConfig build(KinesisAsyncClient kinesisAsyncClient, MultiLangDaemonConfiguration parent) { return ConfigurationSettableUtils.resolveFields(this, new FanOutConfig(kinesisAsyncClient).applicationName(parent.getApplicationName()) .streamName(parent.getStreamName())); }  @Override FanOutConfig build(KinesisAsyncClient kinesisAsyncClient, MultiLangDaemonConfiguration parent); }
FanoutConfigBean implements RetrievalConfigBuilder { @Override public FanOutConfig build(KinesisAsyncClient kinesisAsyncClient, MultiLangDaemonConfiguration parent) { return ConfigurationSettableUtils.resolveFields(this, new FanOutConfig(kinesisAsyncClient).applicationName(parent.getApplicationName()) .streamName(parent.getStreamName())); }  @Override FanOutConfig build(KinesisAsyncClient kinesisAsyncClient, MultiLangDaemonConfiguration parent);  }