@Test void testDynamoDbCreation() throws Exception { UsersDaoFactory usersDaoFactory = FACTORY.build(new File(Resources.getResource( "fixtures/configuration/dao/dynamodb-config.yaml").toURI())); assertTrue(usersDaoFactory instanceof DynamoDbUsersDaoFactory); var healthCheck = usersDaoFactory.createHealthCheck(); assertTrue(healthCheck instanceof DynamoDbHealthCheck); }
@Override public DatabaseHealthCheck createHealthCheck() { LOG.info("Creating DynamoDB implementation of DatabaseHealthCheck"); initializeDynamoDbClient(); return new DynamoDbHealthCheck(dynamoDbClient); }
DynamoDbUsersDaoFactory implements UsersDaoFactory { @Override public DatabaseHealthCheck createHealthCheck() { LOG.info("Creating DynamoDB implementation of DatabaseHealthCheck"); initializeDynamoDbClient(); return new DynamoDbHealthCheck(dynamoDbClient); } }
DynamoDbUsersDaoFactory implements UsersDaoFactory { @Override public DatabaseHealthCheck createHealthCheck() { LOG.info("Creating DynamoDB implementation of DatabaseHealthCheck"); initializeDynamoDbClient(); return new DynamoDbHealthCheck(dynamoDbClient); }  }
DynamoDbUsersDaoFactory implements UsersDaoFactory { @Override public DatabaseHealthCheck createHealthCheck() { LOG.info("Creating DynamoDB implementation of DatabaseHealthCheck"); initializeDynamoDbClient(); return new DynamoDbHealthCheck(dynamoDbClient); }  String getEndpoint(); String getRegion(); String getTableName(); @Override @SuppressWarnings("ConstantConditions") UsersDao createUsersDao(ObjectMapper mapper); @Override DatabaseHealthCheck createHealthCheck(); }
DynamoDbUsersDaoFactory implements UsersDaoFactory { @Override public DatabaseHealthCheck createHealthCheck() { LOG.info("Creating DynamoDB implementation of DatabaseHealthCheck"); initializeDynamoDbClient(); return new DynamoDbHealthCheck(dynamoDbClient); }  String getEndpoint(); String getRegion(); String getTableName(); @Override @SuppressWarnings("ConstantConditions") UsersDao createUsersDao(ObjectMapper mapper); @Override DatabaseHealthCheck createHealthCheck();  }