@Test
public void testPointNotOnCurve() throws Exception {

  for (int i = 0; i < testVectors1.length; i++) {
    ECPoint pubPoint =
        new ECPoint(
            new BigInteger(testVectors1[i].pubX, 16),
            new BigInteger(testVectors1[i].pubY, 16).subtract(BigInteger.ONE));
    try {
      EllipticCurves.checkPointOnCurve(pubPoint, testVectors1[i].getCurve());
      fail("The point is not on the curve");
    } catch (GeneralSecurityException expected) {
      // Expected
    }
  }
}