@Test
public void solrCloudShouldStart() throws IOException, SolrServerException, KeeperException, InterruptedException, NotFoundServiceException {

    String collectionName = configuration.getString(SolrCloudConfig.SOLR_COLLECTION_NAME);
      String zkHostString = configuration.getString(Config.ZOOKEEPER_HOST_KEY) + ":" + configuration.getInt(Config.ZOOKEEPER_PORT_KEY);
      CloudSolrClient client = new CloudSolrClient(zkHostString);
    CloudSolrClient client = ((SolrCloudBootstrap) HadoopBootstrap.INSTANCE.getService("SOLRCLOUD")).getClient();
    for (int i = 0; i < 1000; ++i) {
        SolrInputDocument doc = new SolrInputDocument();
        doc.addField("cat", "book");
        doc.addField("id", "book-" + i);
        doc.addField("name", "The Legend of the Hobbit part " + i);
        client.add(collectionName, doc);
        if (i % 100 == 0) client.commit(collectionName);  // periodically flush
    }
    client.commit("collection1");
    SolrDocument collection1 = client.getById(collectionName, "book-1");
    assertNotNull(collection1);
    assertThat(collection1.getFieldValue("name")).isEqualTo("The Legend of the Hobbit part 1");
    client.close();
}