public void testMinMaxOnIntArrayPartition() {
int min = Integer.MAX_VALUE;
int max = Integer.MIN_VALUE;
// Normal case
IntArrayPartition p = new StaticIntArrayPartition(rand.nextInt(1000), 1000);
for(int i = p.getIndexStart(), end = p.getIndexEnd(); i < end; i++) {
int val = rand.nextInt();
if(val > max) max = val;
if(val < min) min = val;
p.set(i, val);
}
assertEquals(max, Stores.max(p));
assertEquals(min, Stores.min(p));