Modify _verify_response to validate response codes.

The method will now take a response code as an additional
parameter and will validate it against the actual one.
Fixes bug 1156684

Change-Id: Idba3f54ed50b359d9230707fb45e7c5ea68e6b7d
Merge "Modify _verify_response to validate response codes."