static TimerResult fromJson(String json) {
    return JsonUtil.parse(json, TimerResultParser::fromJson);
  }
@Test
  public void unsupportedTimeUnit() {
    assertThatThrownBy(
            () ->
                TimerResultParser.fromJson(
                    "{\"count\":44,\"time-unit\":\"unknown\",\"total-duration\":24}"))
        .isInstanceOf(IllegalArgumentException.class)
        .hasMessage("Invalid time unit: unknown");
  }