@Test
public void testGetArray() throws Exception {

	ArrayRandomAccessSource source1 = new ArrayRandomAccessSource(data); // 0 - 99
	ArrayRandomAccessSource source2 = new ArrayRandomAccessSource(data); // 100 - 199
	ArrayRandomAccessSource source3 = new ArrayRandomAccessSource(data); // 200 - 299
	
	RandomAccessSource[] inputs = new RandomAccessSource[]{
			source1, source2, source3
	};
	
	GroupedRandomAccessSource grouped = new GroupedRandomAccessSource(inputs);
	byte[] out = new byte[500];
	Assert.assertEquals(300, grouped.get(0, out, 0, 300));
	assertArrayEqual(rangeArray(0, 100), 0, out, 0, 100);
	assertArrayEqual(rangeArray(0, 100), 0, out, 100, 100);
	assertArrayEqual(rangeArray(0, 100), 0, out, 200, 100);
	
	Assert.assertEquals(300, grouped.get(0, out, 0, 301));
	assertArrayEqual(rangeArray(0, 100), 0, out, 0, 100);
	assertArrayEqual(rangeArray(0, 100), 0, out, 100, 100);
	assertArrayEqual(rangeArray(0, 100), 0, out, 200, 100);
	
	Assert.assertEquals(100, grouped.get(150, out, 0, 100));
	assertArrayEqual(rangeArray(50, 50), 0, out, 0, 50);
	assertArrayEqual(rangeArray(0, 50), 0, out, 50, 50);
}