public static QueryOptimizer newOptimizer(HazelcastProperties properties) {
        HazelcastProperty property = ClusterProperty.QUERY_OPTIMIZER_TYPE;
        String string = properties.getString(property);
        Type type;
        try {
            type = Type.valueOf(string);
        } catch (IllegalArgumentException e) {
            throw onInvalidOptimizerType(string);
        }
        switch (type) {
            case RULES:
                return new RuleBasedQueryOptimizer();
            default:
                return new EmptyOptimizer();
        }
    }
@Test
    public void newOptimizer_whenPropertyContainsNone_thenCreateEmptyOptimizer() {
        HazelcastProperties hazelcastProperties = createMockHazelcastProperties(QUERY_OPTIMIZER_TYPE, "NONE");
        QueryOptimizer queryOptimizer = QueryOptimizerFactory.newOptimizer(hazelcastProperties);

        assertThat(queryOptimizer).isInstanceOf(EmptyOptimizer.class);
    }