Add tests for groups_from_chapters
Reorder some tests