final PreparedStatement ps = connection.prepareStatement("SELECT 'str' as str, hstore('key', 'val') as map");
final ResultSet rs = ps.executeQuery();
final TypeMapper<?> mapper = TypeMapperFactory.createTypeMapper(ClassWithMap.class);
int i = 0;
while (rs.next()) {
final ClassWithMap result = (ClassWithMap) mapper.mapRow(rs, i++);
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());
}
}