migrating set response from helper function to when step in preview feature
separate single when/then steps by converting to helper function
use of httpstatuscode check function in given step and rebased
change function name
remove use of setresponse in then step
set the returned response