### Question:
JsonUtf8Reader extends JsonReader { @Override public void beginArray() throws IOException { int p = peeked; if (p == PEEKED_NONE) { p = doPeek(); } if (p == PEEKED_BEGIN_ARRAY) { pushScope(JsonScope.EMPTY_ARRAY); pathIndices[stackSize - 1] = 0; peeked = PEEKED_NONE; } else { throw new JsonDataException( "Expected BEGIN_ARRAY but was " + peek() + " at path " + getPath()); } } JsonUtf8Reader(BufferedSource source);   JsonUtf8Reader(JsonUtf8Reader copyFrom); @Override void beginArray(); @Override void endArray(); @Override void beginObject(); @Override void endObject(); @Override boolean hasNext(); @Override Token peek(); @Override String nextName(); @Override int selectName(Options options); @Override void skipName(); @Override String nextString(); @Override int selectString(Options options); @Override boolean nextBoolean(); @Override @Nullable T nextNull(); @Override double nextDouble(); @Override long nextLong(); @Override int nextInt(); @Override void close(); @Override void skipValue(); @Override BufferedSource nextSource(); @Override JsonReader peekJson(); @Override String toString(); @Override void promoteNameToValue();  }### Answer:
@Test public void tooDeeplyNestedArrays() throws IOException { JsonReader reader = newReader(repeat("[", MAX_DEPTH + 1) + repeat("]", MAX_DEPTH + 1)); for (int i = 0; i < MAX_DEPTH; i++) { reader.beginArray(); } try { reader.beginArray(); fail(); } catch (JsonDataException expected) { assertThat(expected) .hasMessageThat() .isEqualTo("Nesting too deep at $" + repeat("[0]", MAX_DEPTH)); } }