I am having problems getting my head around generics in the following situation, see inline comments below for my questions:
public void exampleMethod() { //
You don't need wildcards here In your case it would suffice to say
Set test;
And you can then put any subclass of AbstractGroup into the set.
Also, it doesn't look like you're initializing test in your code above.