/**
* First test verifies that bean builder works as expected
*/
public void testLowLevelMaterializer() throws Exception
{
AbstractTypeMaterializer mat = new AbstractTypeMaterializer();
DeserializationConfig config = new ObjectMapper().getDeserializationConfig();
Class<?> impl = mat.materializeClass(config, Bean.class);
assertNotNull(impl);
assertTrue(Bean.class.isAssignableFrom(impl));
// also, let's instantiate to make sure:
Object ob = impl.newInstance();
// and just for good measure do actual cast
Bean bean = (Bean) ob;
// call something to ensure generation worked...
assertNull(bean.getA());
// Also: let's verify that we can handle dup calls:
Class<?> impl2 = mat.materializeClass(config, Bean.class);
assertNotNull(impl2);
assertSame(impl, impl2);
}