test that group_id attribute is present and correct in LMS responses

TNL-24

@gwprice @dan-f (reqd)
Looks like you're using these three lines (more or less) 9 times. Maybe you could extract them into a helper function?