*/
@Test
public void testGetValues()
{
final IntArray array = new IntArray(4);
array.setValue(0, 1);
array.setValue(1, 2);
array.setValue(2, 3);
array.setValue(3, 4);
// Test getting copy of values
long[] values = array.getValues();
assertEquals(1, values[0]);
assertEquals(2, values[1]);
assertEquals(3, values[2]);
assertEquals(4, values[3]);
// Test filling array with values
values = new long[4];
array.getValues(values);
assertEquals(1, values[0]);
assertEquals(2, values[1]);
assertEquals(3, values[2]);
assertEquals(4, values[3]);
// Test getting subset of array
values = new long[4];
array.getValues(1, 2, values);
assertEquals(2, values[0]);
assertEquals(3, values[1]);
assertEquals(0, values[2]);
assertEquals(0, values[3]);
// Test getting subset of array and writing to specific offset
values = new long[4];
array.getValues(1, 2, values, 1);
assertEquals(0, values[0]);
assertEquals(2, values[1]);
assertEquals(3, values[2]);
assertEquals(0, values[3]);
}