UT for GroupPolicy plugin

And also some other fixes