### Question:
JsonArray implements IJsonArray { @Nonnull @ReturnsMutableCopy public JsonArray getSubArray (@Nonnegative final int nStartIndex, @Nonnegative final int nEndIndex) { ValueEnforcer.isGE0 (nStartIndex, "StartIndex"); ValueEnforcer.isBetweenInclusive (nEndIndex, "EndIndex", nStartIndex, m_aValues.size ()); final int nLength = nEndIndex - nStartIndex; final JsonArray ret = new JsonArray (nLength); ret.addAll (m_aValues.subList (nStartIndex, nEndIndex)); return ret; } JsonArray();  JsonArray(@Nonnegative final int nInitialCapacity);  JsonArray(@Nonnull final Iterable <? extends IJson> aJsons);  JsonArray(@Nonnull final IJson... aJsons); final boolean isArray(); final boolean isObject(); final boolean isValue(); @Nonnegative int size(); boolean isEmpty(); @Nonnull Iterator <IJson> iterator(); @Override @Nonnull JsonArray add(@Nonnull final IJson aValue); @Nonnull JsonArray addAt(@Nonnegative final int nIndex, @Nonnull final IJson aValue); @Nonnull IJson removeAndReturnAtIndex(@Nonnegative final int nIndex); @Nonnull EChange removeAtIndex(@Nonnegative final int nIndex); @Nullable IJson get(@Nonnegative final int nIndex); @Nonnull @ReturnsMutableCopy JsonArray getSubArray(@Nonnegative final int nStartIndex, @Nonnegative final int nEndIndex); @Nonnull @ReturnsMutableCopy ICommonsList <IJson> getAll(); @Override void forEach(@Nonnull final Consumer <? super IJson> aConsumer); void forEachByIndex(@Nonnull final ObjIntConsumer <? super IJson> aConsumer); boolean contains(@Nullable final IJson aValue); @Nonnull @ReturnsMutableCopy ICommonsList <IJson> getClonedValues(); @Nonnull JsonArray getClone(); @Override boolean equals(final Object o); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void testGetSubArray () { final JsonArray aArray = new JsonArray (); for (int i = 1; i <= 10; ++i) aArray.add (i); assertEquals ("[1,2,3,4,5,6,7,8,9,10]", aArray.getAsJsonString ()); final IJsonArray aSubArray = aArray.getSubArray (1, 5); assertEquals ("[2,3,4,5]", aSubArray.getAsJsonString ()); assertEquals ("[10]", aArray.getSubArray (9, 10).getAsJsonString ()); assertEquals ("[]", aArray.getSubArray (0, 0).getAsJsonString ()); aArray.removeAtIndex (1); assertEquals ("[1,3,4,5,6,7,8,9,10]", aArray.getAsJsonString ()); assertEquals ("[2,3,4,5]", aSubArray.getAsJsonString ()); }