@Test
public void nonObjectRequest() throws Exception {

  try {
    request.setContent("\"a string\"".getBytes(StandardCharsets.UTF_8));
    RestServletRequestParamReader reader = createReader(ImmutableMap.of("path", "1234"));
    reader.read();
    fail("expected BadRequestException");
  } catch (BadRequestException e) {
    // expected
  }
}