@Test
public void resourceOverridesQuery() throws Exception {

  request.addParameter("query", NOV_1.toString());
  request.addParameter("defaultvalue", NOV_2.toString());
  request.setContent(
      String.format("{\"query\": \"%s\"}", NOV_2).getBytes(StandardCharsets.UTF_8));
  RestServletRequestParamReader reader = createReader(ImmutableMap.of("path", "1234"));
  Object[] params = reader.read();
  assertThat(params).hasLength(endpointMethod.getParameterClasses().length);
  assertThat(params).asList()
      .containsExactly(
          1234L,
          null,
          NOV_2,
          new TestResource(NOV_2))
      .inOrder();
}