@Test public void allServicesProvisioned() { ApplicationContext testContext = getTestApplicationContext("cloud-all-services.xml", createMysqlService("mysqlDb"), createPostgresqlService("postDb"), createMongoService("mongoDb"), createRedisService("redisDb"), createRabbitService("rabbit"), createCassandraService("cassandra")); assertNotNull("Getting service by id", testContext.getBean("mysqlDb")); assertNotNull("Getting service by id and type", testContext.getBean("mysqlDb", DataSource.class)); assertNotNull("Getting service by id", testContext.getBean("postDb")); assertNotNull("Getting service by id and type", testContext.getBean("postDb", DataSource.class)); assertNotNull("Getting service by id", testContext.getBean("mongoDb")); assertNotNull("Getting service by id and type", testContext.getBean("mongoDb", MongoDbFactory.class)); assertNotNull("Getting service by id", testContext.getBean("redisDb")); assertNotNull("Getting service by id and type", testContext.getBean("redisDb", RedisConnectionFactory.class)); assertNotNull("Getting service by id", testContext.getBean("rabbit")); assertNotNull("Getting service by id and type", testContext.getBean("rabbit", ConnectionFactory.class)); assertNotNull("Getting service by id", testContext.getBean("cassandra")); assertNotNull("Getting service by id and type", testContext.getBean("cassandra", Cluster.class)); } }