final PreparedStatement ps = connection.prepareStatement("SELECT tmp.string_array_function();");
final ResultSet rs = ps.executeQuery();
final TypeMapper<ClassWithStringSet> mapper = TypeMapperFactory.createTypeMapper(ClassWithStringSet.class);
int i = 0;
while (rs.next()) {
ClassWithStringSet result = (ClassWithStringSet) mapper.mapRow(rs, i++);
Assert.assertNotNull(result);
Assert.assertEquals("str", result.getStr());
Assert.assertNotNull(result.getArray());
Assert.assertTrue(result.getArray().size() == 2);
Assert.assertTrue(result.getArray().contains("result_1"));
Assert.assertTrue(result.getArray().contains("result_2"));
}
}