@Test public void testCopyArrayWrong(){ String[] foo = {"hello", "there", "!"}; String[] copy = CopyExample.copyWrong(foo); checkSameData(foo, copy); String WRONG = "WRONG"; copy[0] = WRONG; assertEquals(WRONG, foo[0]); }
public static String[] copyWrong(String[] input){ if(input == null){ return null; } String[] output = input; return output; }
CopyExample { public static String[] copyWrong(String[] input){ if(input == null){ return null; } String[] output = input; return output; } }
CopyExample { public static String[] copyWrong(String[] input){ if(input == null){ return null; } String[] output = input; return output; }  }
CopyExample { public static String[] copyWrong(String[] input){ if(input == null){ return null; } String[] output = input; return output; }  static String[] copyWrong(String[] input); static String[] copy(String[] input); static String[][] copyWrong(String[][] input); static String[][] copy(String[][] input); }
CopyExample { public static String[] copyWrong(String[] input){ if(input == null){ return null; } String[] output = input; return output; }  static String[] copyWrong(String[] input); static String[] copy(String[] input); static String[][] copyWrong(String[][] input); static String[][] copy(String[][] input);  }