public final void setStrictness(Strictness strictness) {
    this.strictness = Objects.requireNonNull(strictness);
  }
@Test
  public void testNonFiniteFloatsWhenStrict() throws IOException {
    StringWriter stringWriter = new StringWriter();
    JsonWriter jsonWriter = new JsonWriter(stringWriter);
    jsonWriter.setStrictness(Strictness.STRICT);
    assertNonFiniteFloatsExceptions(jsonWriter);
  }