@Test
public void testBadRequestToString() {

  ErrorMessage errorMessage =
      new ErrorMessage(new IllegalStateException(),
          BAD_REQUEST.getStatus());
  assertEquals("{\n"
      + "  \"error\": {\n"
      + "    \"reason\": \"Invalid Query\",\n"
      + "    \"details\": \"\",\n"
      + "    \"type\": \"IllegalStateException\"\n"
      + "  },\n"
      + "  \"status\": 400\n"
      + "}", errorMessage.toString());
}