Registry { public static KeyManager<?> getUntypedKeyManager(String typeUrl) throws GeneralSecurityException { KeyManagerContainer container = getKeyManagerContainerOrThrow(typeUrl); return container.getUntypedKeyManager(); } private  Registry(); @Deprecated static synchronized void addCatalogue(String catalogueName, Catalogue<?> catalogue); @Deprecated static Catalogue<?> getCatalogue(String catalogueName); static synchronized void registerKeyManager(final KeyManager<P> manager); static synchronized void registerKeyManager(
      final KeyManager<P> manager, boolean newKeyAllowed); static synchronized void registerKeyManager(
      final KeyTypeManager<KeyProtoT> manager, boolean newKeyAllowed); static synchronized void registerAsymmetricKeyManagers(
          final PrivateKeyTypeManager<KeyProtoT, PublicKeyProtoT> privateKeyTypeManager,
          final KeyTypeManager<PublicKeyProtoT> publicKeyTypeManager,
          boolean newKeyAllowed); @Deprecated static synchronized void registerKeyManager(
      String typeUrl, final KeyManager<P> manager); @Deprecated static synchronized void registerKeyManager(
      String typeUrl, final KeyManager<P> manager, boolean newKeyAllowed); static synchronized void registerPrimitiveWrapper(
      final PrimitiveWrapper<B, P> wrapper); @Deprecated static KeyManager<P> getKeyManager(String typeUrl); static KeyManager<?> getUntypedKeyManager(String typeUrl); static KeyManager<P> getKeyManager(String typeUrl, Class<P> primitiveClass); static synchronized KeyData newKeyData(KeyTemplate keyTemplate); static synchronized MessageLite newKey(KeyTemplate keyTemplate); static synchronized MessageLite newKey(String typeUrl, MessageLite format); static KeyData getPublicKeyData(String typeUrl, ByteString serializedPrivateKey); @Deprecated @SuppressWarnings("TypeParameterUnusedInFormals") static P getPrimitive(String typeUrl, MessageLite key); static P getPrimitive(String typeUrl, MessageLite key, Class<P> primitiveClass); @Deprecated @SuppressWarnings("TypeParameterUnusedInFormals") static P getPrimitive(String typeUrl, ByteString serializedKey); static P getPrimitive(
      String typeUrl, ByteString serializedKey, Class<P> primitiveClass); @Deprecated @SuppressWarnings("TypeParameterUnusedInFormals") static P getPrimitive(String typeUrl, byte[] serializedKey); static P getPrimitive(String typeUrl, byte[] serializedKey, Class<P> primitiveClass); @Deprecated @SuppressWarnings("TypeParameterUnusedInFormals") static P getPrimitive(KeyData keyData); static P getPrimitive(KeyData keyData, Class<P> primitiveClass); @Deprecated static PrimitiveSet<P> getPrimitives(KeysetHandle keysetHandle); static PrimitiveSet<P> getPrimitives(
      KeysetHandle keysetHandle, Class<P> primitiveClass); @Deprecated static PrimitiveSet<P> getPrimitives(
      KeysetHandle keysetHandle, final KeyManager<P> customManager); static PrimitiveSet<P> getPrimitives(
      KeysetHandle keysetHandle, final KeyManager<P> customManager, Class<P> primitiveClass); static P wrap(PrimitiveSet<B> primitiveSet, Class<P> clazz); static P wrap(PrimitiveSet<P> primitiveSet); static Class<?> getInputPrimitive(Class<?> wrappedPrimitive);  }
@Test public void testGetUntypedKeyManager_shouldWorkHmac() throws Exception { assertThat(Registry.getUntypedKeyManager(MacConfig.HMAC_TYPE_URL).getClass().toString()) .contains("KeyManagerImpl"); }