Mocking HEAD request in unit test to match implementation code.