### Question:
ParserUtils { public static <T> T[] copyOf(@Nonnull T[] array, int newLength) { return (T[]) copyOf(array, newLength, array.getClass()); }  static void checkInterruption(); static void skipWhitespaces(@Nonnull Parser.Parameters p); static void tryToParse(@Nonnull Parser.Parameters p,
                                  int pos0,
                                  char ch); static void tryToParse(@Nonnull Parser.Parameters p,
                                  int pos0,
                                  @Nonnull String s); static void throwParseException(@Nonnull Parser.Parameters p,
                                           int pos0,
                                           @Nonnull String messageId); @Nonnull static ParseException makeParseException(@Nonnull Parser.Parameters p, int pos0, @Nonnull String messageId); static void throwParseException(@Nonnull Parser.Parameters p,
                                           int pos0,
                                           @Nonnull String messageId,
                                           @Nonnull Object parameter); static void throwParseException(@Nonnull Parser.Parameters p,
                                           int pos0,
                                           @Nonnull String messageId,
                                           Object... parameters); @Nonnull static ParseException makeParseException(@Nonnull Parser.Parameters p, int pos0, @Nonnull String messageId, Object... parameters); static T[] copyOf(@Nonnull T[] array, int newLength); static T[] copyOf(@Nonnull T[] array); static T[] copyOf(U[] array, int newLength, Class<? extends T[]> newType);  }### Answer:
@Test public void testCopyOf() throws Exception { final Integer[] array = new Integer[]{1, 2, 3, 7}; final Integer[] copy = ParserUtils.copyOf(array); Assert.assertEquals(array.length, copy.length); Assert.assertEquals(array[0], copy[0]); Assert.assertEquals(array[1], copy[1]); Assert.assertEquals(array[2], copy[2]); Assert.assertEquals(array[3], copy[3]); copy[3] = 12; Assert.assertFalse(array[3].equals(copy[3])); }