added tests for json resp