public void testReplicate_ReplicableType() {
ReplicableObject[] toReplicate = new ReplicableObject[0];
ReplicableObject[] replica = new ReplicableObject[0];
ArrayOperations.replicate(toReplicate, replica);
assertEquals(0, replica.length);
ReplicableObject one = new ReplicableObject(1);
toReplicate = new ReplicableObject[] {one};
replica = new ReplicableObject[1];
ArrayOperations.replicate(toReplicate, replica);
assertNotSame(replica, toReplicate);
assertNotSame(replica[0], toReplicate[0]);
assertArrayEquals(new ReplicableObject[] {one}, replica);
ReplicableObject two = new ReplicableObject(2);
ReplicableObject three = new ReplicableObject(3);
toReplicate = new ReplicableObject[] {one, two, three};
replica = new ReplicableObject[3];
ArrayOperations.replicate(toReplicate, replica);
two.setField(20);
assertEquals(20, toReplicate[1].getField());