public void delete(final String key) {
        try {
            client.delete().guaranteed().deletingChildrenIfNeeded().forPath(key);
        } catch (Exception e) {
            throw new ShenyuException(e);
        }
    }
@Test
    void delete() throws Exception {
        assertThrows(ShenyuException.class, () -> client.delete("/test"));
        DeleteBuilder deleteBuilder = mock(DeleteBuilder.class);
        when(curatorFramework.delete()).thenReturn(deleteBuilder);
        ChildrenDeletable childrenDeletable = mock(ChildrenDeletable.class);
        when(deleteBuilder.guaranteed()).thenReturn(childrenDeletable);
        BackgroundVersionable backgroundVersionable = mock(BackgroundVersionable.class);
        when(childrenDeletable.deletingChildrenIfNeeded()).thenReturn(backgroundVersionable);
        doNothing().when(backgroundVersionable).forPath(anyString());
        assertDoesNotThrow(() -> client.delete("/test"));
    }