Refactor usage of custom_match tests

For some requests a check outside of custom_match was used, thus
bug #1262534 was not completely closed.

This patch refactors part of the code to use custom_match
as far as possible and also adds some more checks.

Closes-Bug: #1262534
Change-Id: Ic0760d6d91a83bdce45ae42dd3f9d05a7bc8b6b3
Merge "Refactor usage of custom_match tests"