### Question:
FeaturesConfigReader extends AbstractConfigReader { public static FieldFeatureExtractorFactory loadFactory(FeaturesConfigReader.FeatureDesc featureDesc){ ClassLoader loader = Thread.currentThread().getContextClassLoader(); try { Class<? extends FieldFeatureExtractorFactory> cls = (Class<? extends FieldFeatureExtractorFactory>) loader.loadClass(featureDesc.klass); Class<?>[] types = {String.class, String.class}; Constructor<? extends FieldFeatureExtractorFactory> constructor; constructor = cls.getConstructor(types); return constructor.newInstance(featureDesc.name, featureDesc.param); } catch (Exception e) { throw new RuntimeException(e); } } FeaturesConfigReader(String fileName);  FeaturesConfigReader(SolrResourceLoader loader, String fileName); FeatureDesc[] getFeatureDescs(); FeatureDesc getFeatureDesc(String name); static FieldFeatureExtractorFactory loadFactory(FeaturesConfigReader.FeatureDesc featureDesc);  }### Answer:
@Test public void testLoadFactory() throws Exception { FeaturesConfigReader fcReader = new FeaturesConfigReader(loader,"ltr_features.conf"); assertEquals(FieldFeatureTFExtractorFactory.class, FeaturesConfigReader.loadFactory(fcReader.getFeatureDesc("TF in title")).getClass()); assertEquals(FieldFeatureTFExtractorFactory.class, FeaturesConfigReader.loadFactory(fcReader.getFeatureDesc("TF in body")).getClass()); assertEquals(FieldFeatureIDFExtractorFactory.class, FeaturesConfigReader.loadFactory(fcReader.getFeatureDesc("IDF in title")).getClass()); assertEquals(FieldFeatureIDFExtractorFactory.class, FeaturesConfigReader.loadFactory(fcReader.getFeatureDesc("IDF in body")).getClass()); }