@Override
    public Optional<String> getValue(Object arg, String type) {
        if (arg instanceof Map) {
            Map<?, ?> map = (Map<?, ?>) arg;
            Object object = map.get(getKey(type));
            return object == null ? Optional.empty() : Optional.of(String.valueOf(object));
        }
        return Optional.empty();
    }
@Test
    public void testValue() {
        TypeStrategy strategy = new MapTypeStrategy();
        Map<String, String> map = new HashMap<>();
        map.put("foo", "bar");

        // normal
        Assert.assertEquals("bar", strategy.getValue(map, ".get(\"foo\")").orElse(null));

        // test null
        Assert.assertNotEquals("bar", strategy.getValue(map, ".get(\"bar\")").orElse(null));

        // test non map
        Assert.assertNotEquals("bar", strategy.getValue("foo", ".get(\"foo\")").orElse(null));

        // the test is not equal
        Assert.assertNotEquals("foo", strategy.getValue(map, ".get(\"foo\")").orElse(null));
    }