@Test
  public void pointDecode_crunchy_failsIfPointIsNotOnCurve() throws Exception {
    // Same as an entry of testVectors2, but the last byte is changed from f4 to f5
    byte[] encoded =
        Hex.decode(
            "0000000000000000000000000000000000000000000000000000000000000000"
                + "66485c780e2f83d72433bd5d84a06bb6541c2af31dae871728bf856a174f93f5");
    // Adding one to y make the point not be on the curve.
    assertThrows(GeneralSecurityException.class,
        () -> EllipticCurves.pointDecode(EllipticCurves.CurveType.NIST_P256,
            EllipticCurves.PointFormatType.DO_NOT_USE_CRUNCHY_UNCOMPRESSED, encoded));
  }
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