@BeforeClass
  public static void setUpClass() throws Exception {
    // We register Tink and key manger, as a user would typically do if they add their own key type.
    HybridConfig.register();
    // Register the key managers the user would register. These have type URLs PRIVATE_TYPE_URL and
    // PUBLIC_TYPE_URL, and interpret the keys as HpkePrivateKey and HpkePublicKey exactly
    // as Tink would. However, the parameters need to be:
    //  * DHKEM_X25519_HKDF_SHA256
    //  * HKDF_SHA256
    //  * AES_128_GCM
    Registry.registerKeyManager(new LegacyHybridDecryptKeyManager(), true);
    Registry.registerKeyManager(new LegacyHybridEncryptKeyManager(), false);

    publicKeyByteArray =
        Hex.decode("37fda3567bdbd628e88668c3c8d7e97d1d1253b6d4ea6d44c150f741f1bf4431");
    privateKeyByteArray =
        Hex.decode("52c4a758a802cd8b936eceea314432798d5baf2d7e9235dc084ab1b9cfa2f736");
  }
This test attempts to test the case where a user registers their own key type with
Registry.registerKeyManager() and then uses it.
java_src/src/test/java/com/google/crypto/tink/hybrid/KeyManagerIntegrationTest.java