CassandraBootstrap implements Bootstrap { public Session getCassandraSession() { return this.session; } CassandraBootstrap();  CassandraBootstrap(URL url); @Override ComponentMetadata getMetadata(); @Override String getProperties(); @Override void loadConfig(Map<String, String> configs); @Override Bootstrap start(); @Override Bootstrap stop(); Session getCassandraSession(); public Session session; }
@Test public void cassandraShouldStart() throws NotFoundServiceException { Bootstrap cassandra = HadoopBootstrap.INSTANCE.getService("CASSANDRA"); Session session = ((CassandraBootstrap) cassandra).getCassandraSession(); ResultSet execute = session.execute("select * from test.test"); List<Row> res = execute.all(); assertEquals(res.size(), 1); assertEquals(res.get(0).getString("user"), "user1"); assertEquals(res.get(0).getString("value"), "value1"); }