private static HpkeParameters.Variant variantForOutputPrefix(OutputPrefixType outputPrefixType)
      throws GeneralSecurityException {
    switch (outputPrefixType) {
      case LEGACY:
      case CRUNCHY:
        return HpkeParameters.Variant.CRUNCHY;
      case TINK:
        return HpkeParameters.Variant.TINK;
      case RAW:
        return HpkeParameters.Variant.NO_PREFIX;
      default:
        throw new GeneralSecurityException("Unknown output prefix type: " + outputPrefixType);
    }
  }
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