GlobalConfig { public static ObjectPropertyOperator getPropertyOperator() { return propertyOperator; }  static ObjectConverter getObjectConverter(); static ObjectPropertyOperator getPropertyOperator(); static void setPropertyOperator(ObjectPropertyOperator propertyOperator); static void setObjectConverter(ObjectConverter objectConverter);  }
@Test public void testMap() { Map<String, Object> map = new HashMap<>(); map.put("test", "1234"); Assert.assertEquals(GlobalConfig.getPropertyOperator().getProperty(map, "test").orElse(null), "1234"); GlobalConfig.getPropertyOperator().setProperty(map, "test", "12345"); Assert.assertEquals(map.get("test"), "12345"); }
@Test public void testEntity() { TestEntity entity = new TestEntity(); GlobalConfig.getPropertyOperator().setProperty(entity, "name", "12345"); Assert.assertEquals(entity.getName(), "12345"); Assert.assertEquals(GlobalConfig.getPropertyOperator().getProperty(entity, "name").orElse(null), "12345"); }