Improved error messages and unit tests in BaseGroupedMapper, fixed CS

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT

Improved code coverage,  doc blocks, fixed CS of BaseGroupedMapper.