Fix GroupItem setNumberOfGroups bug
When changing the number of groups inside a GroupItem
,
lowering the number doesn't resize m_items
which
leads to a wrong value returned when calling numberOfGroups().
This commit fixes the bug and adds a unit test for the GroupItem class.