Collection { public static String[] tail(String[] args) { if (args.length == 0) { return EMPTY_STRING_ARRAY; } else { return Arrays.copyOfRange(args, 1, args.length); } } private  Collection(); static String[] tail(String[] args); @SafeVarargs static T[] create(T... args); static String join(List<T> list, String separator, Function<T, String> function); static String join(List<String> list, String separator);  }
@Test public void testTail() { assertArrayEquals(new String[]{}, Collection.tail(new String[]{})); assertArrayEquals(new String[]{}, Collection.tail(new String[]{"1"})); assertArrayEquals(new String[]{"2"}, Collection.tail(new String[]{"1", "2"})); assertArrayEquals(new String[]{"2", "3"}, Collection.tail(new String[]{"1", "2", "3"})); }