Better content-negotiation tests, fixed errors while serializing the q parameter.
Fixed IntelliJ warning.