PropertyValueParser { public Object initializeType() { final Class<?> c = SimplePropertyInvoker.createClass(getClassName()); final Object o = SimplePropertyInvoker.instantiateType(c, getClassName()); setProperties(c, o); return o; } protected  PropertyValueParser();  PropertyValueParser(final String config);  PropertyValueParser(final String config, final String clazz); String getClassName(); Map<String, String> getProperties(); static boolean isConfig(final String config); static boolean isParamsOnlyConfig(final String config); Object initializeType();  }
@Test(groups = "props", dataProvider = "properties") public void initializeType(final String property, final Class<?> type, final Object initialized) throws Exception { final PropertyValueParser parser; if (type != null) { parser = new PropertyValueParser(property, type.getName()); Assert.assertTrue(PropertyValueParser.isParamsOnlyConfig(property)); } else { parser = new PropertyValueParser(property); Assert.assertTrue(PropertyValueParser.isConfig(property)); } final Object o = parser.initializeType(); Assert.assertEquals(initialized.toString().split("::")[1], o.toString().split("::")[1]); }