@Test
public void testCopyOf() {

	assertArrayEquals(new int[] {}, ArrayUtils.copyOf(new int[] { 1, 2, 3 }, 0));
	assertArrayEquals(new int[] { 1 }, ArrayUtils.copyOf(new int[] { 1, 2, 3 }, 1));
	assertArrayEquals(new int[] { 1, 2 }, ArrayUtils.copyOf(new int[] { 1, 2, 3 }, 2));
	assertArrayEquals(new int[] { 1, 2, 3 }, ArrayUtils.copyOf(new int[] { 1, 2, 3 }, 3));
	assertArrayEquals(new int[] { 1, 2, 3, 0 }, ArrayUtils.copyOf(new int[] { 1, 2, 3 }, 4));
	try {
		ArrayUtils.copyOf(new int[] { 1, 2, 3 }, -1);
		fail("Should have thrown");
	} catch (NegativeArraySizeException e) {
	}
}