Setting up default response as 401 to APIGateway

I am trying to setup HTTP Basic authentication using serverless. I could do it from console setting DEFAULT_4XX response. When I use below code, AWS::ApiGateway::Method creation fails with error - Invalid mapping expression specified: Validation Result: warnings : [], errors : [Invalid mapping expression specified: Basic realm=“test”].

events:
- http:
path: testPath
method: post
cors: true
integration: lambda
response:
headers:
Content-Type: "‘text/html’"
template: $input.path(’$’)
statusCodes:
401:
pattern: ''
template: {“message”:$context.error.messageString}
headers:
WWW-Authenticate: ‘Basic realm=“test”’