}
public void testReplaceObjectsInRange() {
NSArray<String> array = new NSArray<String>(new String[] { "abc", "def", "ghi" });
NSArray<String> array2 = new NSArray<String>(new String[] { "123", "456" });
NSRange sourceRange = new NSRange(1, 2);
NSRange otherRange = new NSRange(0, 2);
NSMutableArray<String>array3 = array.mutableClone();
array3.replaceObjectsInRange(sourceRange, array2, otherRange);
assertEquals(3, array3.size());
assertEquals("abc", array3.get(0));
assertEquals("123", array3.get(1));
assertEquals("456", array3.get(2));
array3 = array.mutableClone();
sourceRange = new NSRange(0, 3);
otherRange = new NSRange(0, 2);
array3.replaceObjectsInRange(sourceRange, array2, otherRange);
assertEquals(2, array3.size());
assertEquals(array2, array3);
array3 = array.mutableClone();
sourceRange = new NSRange(2, 1);
otherRange = new NSRange(0, 2);
array3.replaceObjectsInRange(sourceRange, array2, otherRange);
assertEquals(4, array3.size());
assertEquals("abc", array3.get(0));
assertEquals("def", array3.get(1));
assertEquals("123", array3.get(2));