boolean success = false;
try {
factory.setLuceneMatchVersion(TEST_VERSION_CURRENT);
factory.init(Collections.<String,String>emptyMap());
if (factory instanceof ResourceLoaderAware) {
ResourceLoaderAware resourceLoaderAware = (ResourceLoaderAware) factory;
resourceLoaderAware.inform(new ClasspathResourceLoader(factory.getClass()));
}
success = true;
} catch (IllegalArgumentException ignored) {
// its ok if we dont provide the right parameters to throw this
}