Added setResponse for unit testing.