TEST(mapping): add some unit tests + refactor

Refs: 788
4 jobs for 788_ACL_TU_refactor in 2 minutes and 20 seconds (queued for 2 seconds)
Status Job ID Name Coverage
  Test
passed #30445
composer_validate

00:00:34

passed #30446
php-lint

00:00:33

passed #30447
phpcs

00:00:33

passed #30448
phpunit

00:02:19

38.11%