@Test
  public void pointEncode_failsIfPointIsNotOnCurve() throws Exception {
    // Same an entry of testVectors2, but the value of y has been incremented by 1.
    BigInteger x = new BigInteger(
        "79974177209371530366349631093481213364328002500948308276357601809416549347930");
    BigInteger y = new BigInteger(
           "11093679777528052772423074391650378811758820120351664471899251711300542565880");
    // Adding one to y make the point not be on the curve.
    assertThrows(
        GeneralSecurityException.class,
        () ->
            EllipticCurves.pointEncode(
                EllipticCurves.CurveType.NIST_P256,
                EllipticCurves.PointFormatType.UNCOMPRESSED,
                new ECPoint(x, y)));
  }
A class for storing test vectors. This class contains the directory for the public and private
key, the message and the corresponding signature.
java_src/src/test/java/com/google/crypto/tink/subtle/EllipticCurvesTest.java