@Override
  public Number getAsNumber() {
    if (value instanceof Number) {
      return (Number) value;
    } else if (value instanceof String) {
      return new LazilyParsedNumber((String) value);
    }
    throw new UnsupportedOperationException("Primitive is neither a number nor a string");
  }
@Test
  public void testAsNumber_Boolean() {
    JsonPrimitive json = new JsonPrimitive(true);
    var e = assertThrows(UnsupportedOperationException.class, () -> json.getAsNumber());
    assertThat(e).hasMessageThat().isEqualTo("Primitive is neither a number nor a string");
  }