refactor responseWriterMock