public SolrTemplate(SolrServerFactory solrServerFactory, SolrConverter solrConverter) { Assert.notNull(solrServerFactory, "SolrServerFactory must not be 'null'."); Assert.notNull( solrServerFactory.getSolrServer(), "SolrServerFactory has to return a SolrServer."); this.solrServerFactory = solrServerFactory; this.solrConverter = solrConverter == null ? getDefaultSolrConverter() : solrConverter; }
@Override public final SolrServer getSolrServer() { return solrServerFactory.getSolrServer(this.solrCore); }
@Before public void setUp() { Mockito.when(factoryMock.getSolrServer(Mockito.anyString())).thenReturn(solrServerMock); writer = new SolrSchemaWriter(factoryMock); }