Add assertions to check the number of elements in the resulting set.
Simplify code by using just the case names instead of the qualified case names.
Minor modifications due to API adjustments in ExtCore 0.8.5.