Added reusable function to verify status code of response without headers and written test for the same