Request req = Request.aClass(ACategoryTest.class);
Runner r = req.getRunner();
Set<Category> cats = new HashSet<Category>();
for (Description each : r.getDescription().getChildren()) {
Category c = CategoryResolver.getCategory(each);
if (c != null) {
cats.add(c);
}
}
// A is twice
assertEquals (3, cats.size());
// select Category "A"
Category a = null;
for (Iterator<Category> iter = cats.iterator() ; iter.hasNext() ; ) {
Category c = (Category) iter.next();
if ("A".equals(c.value())) {
a = c;
}
}
assertNotNull(a);
assertEquals ("A", a.value());