@Test
public void methodOverride() throws IOException {

  req.setRequestURI("/_ah/api/test/v2/increment");
  req.setMethod("POST");
  req.addHeader("X-HTTP-Method-Override", "PATCH");
  req.setParameter("x", "1");
  servlet.service(req, resp);
  assertThat(resp.getStatus()).isEqualTo(HttpServletResponse.SC_OK);
  ObjectMapper mapper = ObjectMapperUtil.createStandardObjectMapper();
  ObjectNode actual = mapper.readValue(resp.getContentAsString(), ObjectNode.class);
  assertThat(actual.size()).isEqualTo(1);
  assertThat(actual.get("x").asInt()).isEqualTo(2);
}