@Test
  public void tooManyRecursions_fail() throws Exception {
    int recursionNum = 150;
    StringBuilder sb = new StringBuilder();
    for (int i = 0; i < recursionNum; i++) {
      sb.append("{\"a\":");
    }
    sb.append("1");
    for (int i = 0; i < recursionNum; i++) {
      sb.append("}");
    }
    assertThrows(IOException.class, () -> JsonParser.parse(sb.toString()));
  }
Tests for Tink's internal {@link JsonParser}.
java_src/src/test/java/com/google/crypto/tink/internal/JsonParserTest.java