@Test
public void testUnsuccessfulPostHandler() throws Exception {

  String path = "/testUnsuccessfulPostHandler";
  boolean[] didRun = {false};
  Handler h = new TestHandler(path, () -> {
    didRun[0] = true;
    throw new GripServerException("Expected");
  });
  instance.addHandler(h);
  HttpResponse response = doPost(path, path.getBytes(StandardCharsets.UTF_8));
  assertEquals("Server should return an internal error (500)",
      500,
      response.getStatusLine().getStatusCode());
  assertTrue("Handler should have run", didRun[0]);
}