@Before public void before() throws Exception {
  tmpSolrHome=createTempDir();
  FileUtils.copyDirectory(new File(TEST_HOME()),tmpSolrHome.getAbsoluteFile());
  final SortedMap<ServletHolder,String> extraServlets=new TreeMap<>();
  final ServletHolder solrRestApi=new ServletHolder("SolrSchemaRestApi",ServerServlet.class);
  solrRestApi.setInitParameter("org.restlet.application","org.apache.solr.rest.SolrSchemaRestApi");
  extraServlets.put(solrRestApi,"/schema/*");
  System.setProperty("managed.schema.mutable","true");
  System.setProperty("enable.update.log","false");
  createJettyAndHarness(tmpSolrHome.getAbsolutePath(),"solrconfig-managed-schema.xml","schema-rest.xml","/solr",true,extraServlets);
}

@ Before public void before ( ) throws Exception { tmpSolrHome = createTempDir ( ) ; FileUtils . copyDirectory ( new File ( TEST_HOME ( ) ) , tmpSolrHome . getAbsoluteFile ( ) ) ; final SortedMap < ServletHolder , String > extraServlets = new TreeMap < > ( ) ; final ServletHolder solrRestApi = new ServletHolder ( "SolrSchemaRestApi" , ServerServlet . class ) ; solrRestApi . setInitParameter ( "org.restlet.application" , "org.apache.solr.rest.SolrSchemaRestApi" ) ; extraServlets . put ( solrRestApi , "/schema/*" ) ; System . setProperty ( "managed.schema.mutable" , "true" ) ; System . setProperty ( "enable.update.log" , "false" ) ; createJettyAndHarness ( tmpSolrHome . getAbsolutePath ( ) , "solrconfig-managed-schema.xml" , "schema-rest.xml" , "/solr" , true , extraServlets ) ; }
setup to make the schema mutable
