SolrBootstrap implements Bootstrap { public EmbeddedSolrServer getClient() { return solrServer; } SolrBootstrap();  SolrBootstrap(URL url); @Override ComponentMetadata getMetadata(); @Override String getProperties(); @Override void loadConfig(Map<String, String> configs); @Override Bootstrap start(); @Override Bootstrap stop(); EmbeddedSolrServer getClient(); static final String SOLR_DIR_KEY; static final String SOLR_COLLECTION_INTERNAL_NAME; }
@Test public void solrShouldStart() throws Exception { EmbeddedSolrServer client = ((SolrBootstrap) HadoopBootstrap.INSTANCE.getService("SOLR")).getClient(); injectIntoSolr(client); SolrDocument collection1 = client.getById(configuration.getString(SolrBootstrap.SOLR_COLLECTION_INTERNAL_NAME), "book-1"); assertNotNull(collection1); assertThat(collection1.getFieldValue("name")).isEqualTo("The Legend of the Hobbit part 1"); }