Please add some test on removing groups, that's the (most) hard part for the logic.