### Question:
Turn { public int[] back(int[] array) { for (int arrayIndex = 0; arrayIndex < array.length / 2; arrayIndex++) { int oldArray = array[arrayIndex]; array[arrayIndex] = array[array.length - arrayIndex - 1]; array[array.length - arrayIndex - 1] = oldArray; } return array; }  int[] back(int[] array);  }### Answer:
@Test public void whenTurnArrayWithEvenAmountOfElementsThenTurnedArray() { int[] data = {1, 2, 3, 4, 5}; Turn array = new Turn(); int[] result = array.back(data); int[] expect = {5, 4, 3, 2, 1}; assertThat(result, is(expect)); }
@Test public void whenTurnArrayWithOddAmountOfElementsThenTurnedArray() { int[] data = {4, 1, 6, 2}; Turn array = new Turn(); int[] result = array.back(data); int[] expect = {2, 6, 1, 4}; assertThat(result, is(expect)); }