### Question:
SelectionSort { public static int[] sort(int[] sourceDatas) { int[] datas = IntStream.of(sourceDatas).distinct().toArray(), result = new int[datas.length]; int data, size = datas.length; for (int i = 0; i < size; i++) { data = getSmallestData(datas); result[i] = data; datas = removeData(data, datas); } return result; }  static int[] sort(int[] sourceDatas);  }### Answer:
@Test public void sort() throws Exception { int[] datas = { 1, 8, 7, 20, 9, 10 }; int[] result = { 1, 7, 8, 9, 10, 20 }; assertArrayEquals(SelectionSort.sort(datas), result); }
@Test public void sort_When_Has_Same_Data() throws Exception { int[] datas = { 1, 7, 7, 20, 9, 10 }; int[] result = { 1, 7, 9, 10, 20 }; assertArrayEquals(SelectionSort.sort(datas), result); }