private synchronized KeyManager<?> getKeyManagerOrThrow(String typeUrl)
      throws GeneralSecurityException {
    if (!keyManagerMap.containsKey(typeUrl)) {
      throw new GeneralSecurityException("No key manager found for key type " + typeUrl);
    }
    return keyManagerMap.get(typeUrl);
  }
Resets the global instance. Should only be used in tests. Not thread safe.
java_src/src/main/java/com/google/crypto/tink/internal/KeyManagerRegistry.java