@Test
void unsupported_aggregation_should_fail() {

  String response = "{\n"
      + "  \"date_histogram#max\": {\n"
      + "    \"value\": 40\n"
      + "  }\n"
      + "}";
  IllegalStateException exception =
      assertThrows(IllegalStateException.class, () -> parse(response));
  assertEquals("unsupported aggregation type date_histogram", exception.getMessage());
}