@Test public void shouldWorkWithAnArrayFullOfPositiveNumbersWithTwoPointersRecursive() { int[] array = { 1, 2, 1, 3, 4, 6 }; splitArray.splitSwappingRecursive(array); assertNegativeElementsAreBeforePositiveOnes(array); }
public void splitSwappingRecursive(int[] array) { if (array == null) { throw new IllegalArgumentException("Array passed as parameter can't be null."); } if (array.length == 0) { return; } splitSwappingRecursiveInner(array, 0, array.length - 1); }
SplitArray { public void splitSwappingRecursive(int[] array) { if (array == null) { throw new IllegalArgumentException("Array passed as parameter can't be null."); } if (array.length == 0) { return; } splitSwappingRecursiveInner(array, 0, array.length - 1); } }
SplitArray { public void splitSwappingRecursive(int[] array) { if (array == null) { throw new IllegalArgumentException("Array passed as parameter can't be null."); } if (array.length == 0) { return; } splitSwappingRecursiveInner(array, 0, array.length - 1); }  }
SplitArray { public void splitSwappingRecursive(int[] array) { if (array == null) { throw new IllegalArgumentException("Array passed as parameter can't be null."); } if (array.length == 0) { return; } splitSwappingRecursiveInner(array, 0, array.length - 1); }  void splitSorting(int[] array); void splitSwappingIterative(int[] array); void splitSwappingRecursive(int[] array); }
SplitArray { public void splitSwappingRecursive(int[] array) { if (array == null) { throw new IllegalArgumentException("Array passed as parameter can't be null."); } if (array.length == 0) { return; } splitSwappingRecursiveInner(array, 0, array.length - 1); }  void splitSorting(int[] array); void splitSwappingIterative(int[] array); void splitSwappingRecursive(int[] array);  }