@Test public void testPoll() throws Exception { AmazonDynamoDB mockBasicDbClient = mock(AmazonDynamoDB.class); when(mockBasicDbClient.scan(any(ScanRequest.class))).thenReturn(DynamoDbMocks.basicScanResult1); DynamoDbConfigurationSource testConfigSource = new DynamoDbConfigurationSource(mockBasicDbClient); PollResult result = testConfigSource.poll(false, null); assertEquals(3, result.getComplete().size()); assertEquals("bar", result.getComplete().get("foo")); assertEquals("goo", result.getComplete().get("goo")); assertEquals("who", result.getComplete().get("boo")); }
@Override public PollResult poll(boolean initial, Object checkPoint) throws Exception { String table = tableName.get(); Map<String, Object> map = loadPropertiesFromTable(table); log.info("Successfully polled Dynamo for a new configuration based on table:" + table); return PollResult.createFull(map); }
DynamoDbConfigurationSource extends AbstractDynamoDbConfigurationSource<Object> implements PolledConfigurationSource { @Override public PollResult poll(boolean initial, Object checkPoint) throws Exception { String table = tableName.get(); Map<String, Object> map = loadPropertiesFromTable(table); log.info("Successfully polled Dynamo for a new configuration based on table:" + table); return PollResult.createFull(map); } }
DynamoDbConfigurationSource extends AbstractDynamoDbConfigurationSource<Object> implements PolledConfigurationSource { @Override public PollResult poll(boolean initial, Object checkPoint) throws Exception { String table = tableName.get(); Map<String, Object> map = loadPropertiesFromTable(table); log.info("Successfully polled Dynamo for a new configuration based on table:" + table); return PollResult.createFull(map); } DynamoDbConfigurationSource();  DynamoDbConfigurationSource(ClientConfiguration clientConfiguration);  DynamoDbConfigurationSource(AWSCredentials credentials);  DynamoDbConfigurationSource(AWSCredentials credentials, ClientConfiguration clientConfiguration);  DynamoDbConfigurationSource(AWSCredentialsProvider credentialsProvider);  DynamoDbConfigurationSource(AWSCredentialsProvider credentialsProvider, ClientConfiguration clientConfiguration);  DynamoDbConfigurationSource(AmazonDynamoDB dbClient); }
DynamoDbConfigurationSource extends AbstractDynamoDbConfigurationSource<Object> implements PolledConfigurationSource { @Override public PollResult poll(boolean initial, Object checkPoint) throws Exception { String table = tableName.get(); Map<String, Object> map = loadPropertiesFromTable(table); log.info("Successfully polled Dynamo for a new configuration based on table:" + table); return PollResult.createFull(map); } DynamoDbConfigurationSource();  DynamoDbConfigurationSource(ClientConfiguration clientConfiguration);  DynamoDbConfigurationSource(AWSCredentials credentials);  DynamoDbConfigurationSource(AWSCredentials credentials, ClientConfiguration clientConfiguration);  DynamoDbConfigurationSource(AWSCredentialsProvider credentialsProvider);  DynamoDbConfigurationSource(AWSCredentialsProvider credentialsProvider, ClientConfiguration clientConfiguration);  DynamoDbConfigurationSource(AmazonDynamoDB dbClient); @Override PollResult poll(boolean initial, Object checkPoint); }
DynamoDbConfigurationSource extends AbstractDynamoDbConfigurationSource<Object> implements PolledConfigurationSource { @Override public PollResult poll(boolean initial, Object checkPoint) throws Exception { String table = tableName.get(); Map<String, Object> map = loadPropertiesFromTable(table); log.info("Successfully polled Dynamo for a new configuration based on table:" + table); return PollResult.createFull(map); } DynamoDbConfigurationSource();  DynamoDbConfigurationSource(ClientConfiguration clientConfiguration);  DynamoDbConfigurationSource(AWSCredentials credentials);  DynamoDbConfigurationSource(AWSCredentials credentials, ClientConfiguration clientConfiguration);  DynamoDbConfigurationSource(AWSCredentialsProvider credentialsProvider);  DynamoDbConfigurationSource(AWSCredentialsProvider credentialsProvider, ClientConfiguration clientConfiguration);  DynamoDbConfigurationSource(AmazonDynamoDB dbClient); @Override PollResult poll(boolean initial, Object checkPoint);  }