class AbstractVector implements Vector {

    @Override public Vector setX(int idx, double val) {
        storageSet(idx, val);

        return this;
    }

}

class AbstractVectorTest {

    private AbstractVector testVector;

    @Test(expected = IndexOutOfBoundsException.class)
    public void setXNegative1() {

        initVector();

        testVector.setX(MathTestConstants.STORAGE_SIZE + 1, -1);
    }

}