final PreparedStatement ps = connection.prepareStatement("SELECT tmp.hstore_type_function();");
final ResultSet rs = ps.executeQuery();
final TypeMapper<?> mapper = TypeMapperFactory.createTypeMapper(ClassWithClassWithMap.class);
int i = 0;
while (rs.next()) {
final ClassWithClassWithMap firstResult = (ClassWithClassWithMap) mapper.mapRow(rs, i++);
final ClassWithMap result = firstResult.getClassWithMap();
Assert.assertEquals("str", result.getStr());
Assert.assertNotNull(result.getMap());
Assert.assertEquals("key", result.getMap().keySet().iterator().next());
Assert.assertEquals("val", result.getMap().values().iterator().next());
}