Added a JSON test (passes).
BadRequestException thrown if the parameters are null.