@Test public void testAllPropertiesTransit() { PollingConfigBean pollingConfigBean = new PollingConfigBean(); pollingConfigBean.setIdleTimeBetweenReadsInMillis(1000); pollingConfigBean.setMaxGetRecordsThreadPool(20); pollingConfigBean.setMaxRecords(5000); pollingConfigBean.setRetryGetRecordsInSeconds(30); ConvertUtilsBean convertUtilsBean = new ConvertUtilsBean(); BeanUtilsBean utilsBean = new BeanUtilsBean(convertUtilsBean); MultiLangDaemonConfiguration multiLangDaemonConfiguration = new MultiLangDaemonConfiguration(utilsBean, convertUtilsBean); multiLangDaemonConfiguration.setStreamName("test-stream"); PollingConfig pollingConfig = pollingConfigBean.build(kinesisAsyncClient, multiLangDaemonConfiguration); assertThat(pollingConfig.kinesisClient(), equalTo(kinesisAsyncClient)); assertThat(pollingConfig.streamName(), equalTo(multiLangDaemonConfiguration.getStreamName())); assertThat(pollingConfig.idleTimeBetweenReadsInMillis(), equalTo(pollingConfigBean.getIdleTimeBetweenReadsInMillis())); assertThat(pollingConfig.maxGetRecordsThreadPool(), equalTo(Optional.of(pollingConfigBean.getMaxGetRecordsThreadPool()))); assertThat(pollingConfig.maxRecords(), equalTo(pollingConfigBean.getMaxRecords())); assertThat(pollingConfig.retryGetRecordsInSeconds(), equalTo(Optional.of(pollingConfigBean.getRetryGetRecordsInSeconds()))); }
@Override public PollingConfig build(KinesisAsyncClient kinesisAsyncClient, MultiLangDaemonConfiguration parent) { return ConfigurationSettableUtils.resolveFields(this, new PollingConfig(parent.getStreamName(), kinesisAsyncClient)); }
PollingConfigBean implements RetrievalConfigBuilder { @Override public PollingConfig build(KinesisAsyncClient kinesisAsyncClient, MultiLangDaemonConfiguration parent) { return ConfigurationSettableUtils.resolveFields(this, new PollingConfig(parent.getStreamName(), kinesisAsyncClient)); } }
PollingConfigBean implements RetrievalConfigBuilder { @Override public PollingConfig build(KinesisAsyncClient kinesisAsyncClient, MultiLangDaemonConfiguration parent) { return ConfigurationSettableUtils.resolveFields(this, new PollingConfig(parent.getStreamName(), kinesisAsyncClient)); }  }
PollingConfigBean implements RetrievalConfigBuilder { @Override public PollingConfig build(KinesisAsyncClient kinesisAsyncClient, MultiLangDaemonConfiguration parent) { return ConfigurationSettableUtils.resolveFields(this, new PollingConfig(parent.getStreamName(), kinesisAsyncClient)); }  boolean anyPropertiesSet(); @Override PollingConfig build(KinesisAsyncClient kinesisAsyncClient, MultiLangDaemonConfiguration parent); }
PollingConfigBean implements RetrievalConfigBuilder { @Override public PollingConfig build(KinesisAsyncClient kinesisAsyncClient, MultiLangDaemonConfiguration parent) { return ConfigurationSettableUtils.resolveFields(this, new PollingConfig(parent.getStreamName(), kinesisAsyncClient)); }  boolean anyPropertiesSet(); @Override PollingConfig build(KinesisAsyncClient kinesisAsyncClient, MultiLangDaemonConfiguration parent);  }