CustomTypeMapping tm = new CustomTypeMapping();
Java5TypeCreator creator = new Java5TypeCreator();
creator.setConfiguration(new Configuration());
tm.setTypeCreator(creator);
Type dto = creator.createType(MapDTO.class);
Set deps = dto.getDependencies();
Type type = (Type) deps.iterator().next();
assertTrue( type instanceof MapType );
MapType mapType = (MapType) type;
deps = dto.getDependencies();
assertEquals(1, deps.size());
type = mapType.getKeyType();
assertNotNull(type);
assertTrue(type.getTypeClass().isAssignableFrom(String.class));
type = mapType.getValueType();
assertNotNull(type);
assertTrue(type.getTypeClass().isAssignableFrom(Integer.class));
}