Fixed test for user and group state.
Fixed bug in group tests.