@Test
public void testGetSampleInt_outOfBounds() throws Exception {

    final int[] data = {0, 1, 2, 3, 4, 5, 6, 7};
    final Array array = Array.factory(data);
    final Grid grid = new ArrayGrid(GridDef.createGlobal(90), array, 19, 1.0, 0.0);
    try {
        grid.getSampleInt(-1, 1);
        fail("ArrayIndexOutOfBoundsException expected");
    } catch (Exception e) {
    }
    try {
        grid.getSampleInt(0, 3);
        fail("ArrayIndexOutOfBoundsException expected");
    } catch (Exception e) {
    }
}