ArrayTranslator { public <T> T[] copyTo(Object[] sourceArray, Class<T> destinationClass) { T[] destinationArray = createDestinationArray(destinationClass, sourceArray.length); copy(sourceArray, destinationArray); return destinationArray; } ArrayTranslator(Configuration configuration); T[] translate(Object[] sourceArray, Class<T> destinationClass,
			TranslationSource translationSource); T[] defensiveCopy(T[] value); T[] copyTo(Object[] sourceArray, Class<T> destinationClass);  }
@Test public void testCreatesWidenedArrayCopy() { String[] source = new String[] { "The", "Quick", "Brown", "Fox" }; CharSequence[] destination = new ArrayTranslator(new Configuration()).copyTo(source, CharSequence.class); Assert.assertNotNull(destination); Assert.assertNotSame(source, destination); Assert.assertTrue(Arrays.equals(source, destination)); Assert.assertEquals(CharSequence.class, destination.getClass() .getComponentType()); }