@Test
  public void testPointNotOnCurve() throws Exception {
    for (int j = 0; j < testVectors.length; j++) {
      final int i = j;
      ECPoint pubPoint =
          new ECPoint(
              new BigInteger(testVectors[i].pubX, 16),
              new BigInteger(testVectors[i].pubY, 16).subtract(BigInteger.ONE));
      assertThrows(
          GeneralSecurityException.class,
          () -> EllipticCurvesUtil.checkPointOnCurve(pubPoint, testVectors[i].getCurve()));
    }
  }
Unit tests for {@link com.google.crypto.tink.subtle.EllipticCurvesUtil}.
java_src/src/test/java/com/google/crypto/tink/internal/EllipticCurvesUtilTest.java