()
| 851 | } |
| 852 | |
| 853 | @Test |
| 854 | public void badRequestDeprecatedJSON() { |
| 855 | HttpQuery query = NettyMocks.getQuery(tsdb, "/?json"); |
| 856 | try { |
| 857 | throw new BadRequestException("Bad user error"); |
| 858 | } catch (BadRequestException e) { |
| 859 | query.badRequest(e); |
| 860 | } |
| 861 | assertEquals(HttpResponseStatus.BAD_REQUEST, query.response().getStatus()); |
| 862 | assertEquals( |
| 863 | "{\"err\":\"Bad user error\"}", |
| 864 | query.response().getContent().toString(Charset.forName("UTF-8"))); |
| 865 | } |
| 866 | |
| 867 | @Test |
| 868 | public void badRequestDefaultSerializer() { |
nothing calls this directly
no test coverage detected