private static void x25519Helper(int privateKeyLen, int peersPublicValueLen)
      throws GeneralSecurityException {
    byte[] privateKey = new byte[privateKeyLen];
    byte[] base = new byte[peersPublicValueLen];
    base[0] = 9;
    try {
      X25519.computeSharedSecret(privateKey, base);
      fail("Expected InvalidKeyException");
    } catch (InvalidKeyException expected) {
    }
  }
Tests against the test vectors in Section 6.1 of RFC 7748. https://tools.ietf.org/html/rfc7748
java_src/src/test/java/com/google/crypto/tink/subtle/X25519Test.java