public void update(String namespaceName, String extensionName) throws InterruptedException {
        if(BuiltInExtensionUtil.isBuiltIn(namespaceName)) {
            LOGGER.debug("SKIP BUILT-IN EXTENSION {}", NamingUtil.toExtensionId(namespaceName, extensionName));
            return;
        }

        var extension = repositories.findPublicId(namespaceName, extensionName);
        var extensionUpdates = new HashMap<Long, String>();
        updateExtensionPublicId(extension, extensionUpdates, false);
        if(!extensionUpdates.isEmpty()) {
            repositories.updateExtensionPublicIds(extensionUpdates);
        }

        var namespaceUpdates = new HashMap<Long, String>();
        updateNamespacePublicId(extension, namespaceUpdates, false);
        if(!namespaceUpdates.isEmpty()) {
            repositories.updateNamespacePublicIds(namespaceUpdates);
        }
    }
@Test
    public void testUpdateUpstream() throws InterruptedException {
        var namespaceName = "foo";
        var namespacePublicId = "123-456-789";
        var extensionName = "bar";
        var extensionPublicId = "abc-def-ghi";

        var namespace = new Namespace();
        namespace.setId(1L);
        namespace.setName(namespaceName);
        namespace.setPublicId("zzz-zzz-zzz");

        var extension = new Extension();
        extension.setId(2L);
        extension.setName(extensionName);
        extension.setPublicId("000-000-000");
        extension.setNamespace(namespace);

        Mockito.when(repositories.findPublicId(namespaceName, extensionName)).thenReturn(extension);
        Mockito.when(idService.getUpstreamPublicIds(extension)).thenReturn(new PublicIds(namespacePublicId, extensionPublicId));

        updateService.update(namespaceName, extensionName);
        Mockito.verify(repositories).updateExtensionPublicIds(Mockito.argThat((Map<Long, String> map) -> {
            return map.size() == 1 && map.get(extension.getId()).equals(extensionPublicId);
        }));
        Mockito.verify(repositories).updateNamespacePublicIds(Mockito.argThat((Map<Long, String> map) -> {
            return map.size() == 1 && map.get(namespace.getId()).equals(namespacePublicId);
        }));
    }