static ValueExtractor instantiateExtractor(AttributeConfig config, ClassLoader classLoader) {
        ValueExtractor extractor = null;
        if (classLoader != null) {
            try {
                extractor = instantiateExtractorWithConfigClassLoader(config, classLoader);
            } catch (IllegalArgumentException ex) {
                // cached back-stage, initialised lazily since it's not a common case
                Logger.getLogger(ExtractorHelper.class)
                        .warning("Could not instantiate extractor with the config class loader", ex);
            }
        }

        if (extractor == null) {
            extractor = instantiateExtractorWithClassForName(config, classLoader);
        }
        return extractor;
    }
@Test
    public void instantiate_extractor() {
        // GIVEN
        AttributeConfig config
                = new AttributeConfig("iq", "com.hazelcast.query.impl.getters.ExtractorHelperTest$IqExtractor");

        // WHEN
        ValueExtractor extractor = instantiateExtractor(config);

        // THEN
        assertThat(extractor).isInstanceOf(IqExtractor.class);
    }