public static <T> T[] reverse(T[] array, final int startIndexInclusive, final int endIndexExclusive) {
		if (isEmpty(array)) {
			return array;
		}
		int i = Math.max(startIndexInclusive, 0);
		int j = Math.min(array.length, endIndexExclusive) - 1;
		T tmp;
		while (j > i) {
			tmp = array[j];
			array[j] = array[i];
			array[i] = tmp;
			j--;
			i++;
		}
		return array;
	}
@Test
	public void reverseTest() {
		int[] a = {1, 2, 3, 4};
		final int[] reverse = ArrayUtil.reverse(a);
		assertArrayEquals(new int[]{4, 3, 2, 1}, reverse);
	}