Added test for sendResponse