public ContentPackUninstallDetails getUninstallDetails(ContentPack contentPack, ContentPackInstallation installation) {
        if (contentPack instanceof ContentPackV1 contentPackV1) {
            return getUninstallDetails(contentPackV1, installation);
        } else {
            throw new IllegalArgumentException("Unsupported content pack version: " + contentPack.version());
        }
    }
@Test
    public void getUninstallDetails() {
        /* Test will be uninstalled */
        when(contentPackInstallService.countInstallationOfEntityById(ModelId.of("dead-beef1"))).thenReturn((long) 1);
        ContentPackUninstallDetails expect = ContentPackUninstallDetails.create(nativeEntityDescriptors);
        ContentPackUninstallDetails result = contentPackService.getUninstallDetails(contentPack, contentPackInstallation);
        assertThat(result).isEqualTo(expect);

        /* Test nothing will be uninstalled */
        when(contentPackInstallService.countInstallationOfEntityById(ModelId.of("dead-beef1"))).thenReturn((long) 2);
        ContentPackUninstallDetails expectNon = ContentPackUninstallDetails.create(ImmutableSet.of());
        ContentPackUninstallDetails resultNon = contentPackService.getUninstallDetails(contentPack, contentPackInstallation);
        assertThat(resultNon).isEqualTo(expectNon);
    }