Properties props = new Properties();
props.setProperty("config.class", MyBean.class.getName());
props.setProperty("config.foo", "flopp");
props.setProperty("config.bar", "123");
Configuration config = new PropertiesConfiguration(props);
MyBean bean = (MyBean) ConfigurationClassUtils.createBean(config, null);
assertEquals("flopp", bean.getFoo());
assertEquals(123, bean.getBar());
}