@Test
  public void multiplyByGenerator_kIsOutOfRange_throws() throws Exception {
    assertThrows(
        GeneralSecurityException.class,
        () ->
            EllipticCurvesUtil.multiplyByGenerator(
                BigInteger.ZERO, EllipticCurvesUtil.NIST_P256_PARAMS));
    assertThrows(
        GeneralSecurityException.class,
        () ->
            EllipticCurvesUtil.multiplyByGenerator(
                BigInteger.valueOf(-1), EllipticCurvesUtil.NIST_P256_PARAMS));
    assertThrows(
        GeneralSecurityException.class,
        () ->
            EllipticCurvesUtil.multiplyByGenerator(
                EllipticCurvesUtil.NIST_P256_PARAMS.getOrder(),
                EllipticCurvesUtil.NIST_P256_PARAMS));
  }
Unit tests for {@link com.google.crypto.tink.subtle.EllipticCurvesUtil}.
java_src/src/test/java/com/google/crypto/tink/internal/EllipticCurvesUtilTest.java