@Test
  public void testWithTinkeyEciesAesGcmHkdf() throws Exception {
    if (TestUtil.isAndroid()) {
      System.out.println("testWithTinkeyEciesAesGcmHkdf doesn't work on Android, skipping");
      return;
    }
    HybridDecrypt hybridDecrypt =
        TinkProtoKeysetFormat.parseKeyset(
                Files.readAllBytes(
                    Paths.get("testdata/keysets/ecies_private_keyset2.bin")),
                InsecureSecretKeyAccess.get())
            .getPrimitive(HybridDecrypt.class);

    HybridEncrypt hybridEncrypt =
        TinkProtoKeysetFormat.parseKeysetWithoutSecret(
                Files.readAllBytes(
                    Paths.get("testdata/keysets/ecies_public_keyset2.bin")))
            .getPrimitive(HybridEncrypt.class);

    byte[] plaintext = Random.randBytes(20);
    byte[] contextInfo = Random.randBytes(20);
    byte[] ciphertext = hybridEncrypt.encrypt(plaintext, contextInfo);
    assertEquals(
        CryptoFormat.TINK_PREFIX_SIZE
        + 65 /* ephemeral key */
        + 12 /* IV */
        + plaintext.length
        + 16 /* tag length */,
        ciphertext.length);
    assertArrayEquals(plaintext, hybridDecrypt.decrypt(ciphertext, contextInfo));
  }
Tests with EciesAesGcmHkdf keys generated by Tinkey.
java_src/src/test/java/com/google/crypto/tink/IntegrationTest.java