Add test for check_auth_request substitution

Includes small refactor of implimentation

Change-Id: I0e64347e60ace4c0defa98e21c7932e830c5529d