final String groupFileName = writeGroupFile(MY_GROUP, MYGROUP_USERS);
_manager = new FileGroupManager(groupFileName);
_manager.open();
Set<Principal> principals = _manager.getUserPrincipalsForGroup("myGroup");
assertEquals(1, principals.size());
assertFalse(principals.contains(new UsernamePrincipal("user2")));
_manager.addUserToGroup("user2", "myGroup");
principals = _manager.getUserPrincipalsForGroup("myGroup");
assertEquals(2, principals.size());
assertTrue(principals.contains(new UsernamePrincipal("user2")));
}