[FIXES JENKINS-25568] GitLab: fix file link for version 4.2

Also contains a bit of clean up, among others a new unit test.