@Test
  public void multiplyByGeneratorOnTestVectors() throws Exception {
    for (EllipticCurvesUtilTest.TestVector element : testVectors) {
      BigInteger privateValue = new BigInteger(element.privateValue, 16);

      ECPoint output = EllipticCurvesUtil.multiplyByGenerator(privateValue, element.curveParams);
      EllipticCurvesUtil.checkPointOnCurve(output, element.getCurve());

      ECPoint expectedPublicPoint =
          new ECPoint(new BigInteger(element.pubX, 16), new BigInteger(element.pubY, 16));
      assertThat(output).isEqualTo(expectedPublicPoint);
    }
  }
Unit tests for {@link com.google.crypto.tink.subtle.EllipticCurvesUtil}.
java_src/src/test/java/com/google/crypto/tink/internal/EllipticCurvesUtilTest.java