### Question:
ArrayHelper { public static String[] slice(String[] strings, int begin, int length) { String[] result = new String[length]; System.arraycopy( strings, begin, result, 0, length ); return result; }  static String[] toStringArray(Collection coll); static String[][] to2DStringArray(Collection coll); static String[] slice(String[] strings, int begin, int length); static int indexOf(T[] array, T element); static boolean contains(Object[] array, Object element); static T[] concat(T[] first, T... second); static T[] concat(List<T[]> arrays); static T[] concat(T firstElement, T... array); static final int[] EMPTY_INT_ARRAY; static final String[] EMPTY_STRING_ARRAY; static final Object[] EMPTY_OBJECT_ARRAY; }### Answer:
@Test public void testSlice() { String[] strings = new String[]{ "1", "2", "3" }; int begin = 0; int length = 2; String[] expResult = new String[]{ "1", "2" }; String[] result = ArrayHelper.slice( strings, begin, length ); assertArrayEquals( expResult, result ); }