@Override
    public Mono<ExtensionStore> delete(String name, Long version) {
        return repository.findById(name)
            .flatMap(extensionStore -> {
                // reset the version
                extensionStore.setVersion(version);
                return repository.delete(extensionStore).thenReturn(extensionStore);
            });
    }
@Test
    void shouldDeleteSuccessfully() {
        var expectedExtension =
            new ExtensionStore("/registry/posts/hello-halo", "hello halo".getBytes(), 2L);

        when(repository.findById(anyString())).thenReturn(Mono.just(expectedExtension));
        when(repository.delete(any())).thenReturn(Mono.empty());

        var deletedExtension = client.delete("/registry/posts/hello-halo", 2L).block();

        assertEquals(expectedExtension, deletedExtension);
    }