@ExtendWith({ RepositoryManagementTestExecutionListener.class,

              ArtifactManagementTestExecutionListener.class })
@Test
public void testForceDeleteArtifactAllowed(@MavenRepository(repositoryId = REPOSITORY_WITH_FORCE_DELETE_1)
                                           Repository repository,
                                           @MavenTestArtifact(repositoryId = REPOSITORY_WITH_FORCE_DELETE_1,
                                                              id = "org.carlspring.strongbox:test-artifact-to-trash",
                                                              versions = "1.1")
                                           Path artifactPath)
        throws IOException
{
    final String storageId = repository.getStorage().getId();
    final String repositoryId = repository.getId();
    final RepositoryPath artifactRepositoryPath = (RepositoryPath) artifactPath.normalize();
    final String artifactRepositoryPathStr = RepositoryFiles.relativizePath(artifactRepositoryPath);
    // Delete the artifact (this one shouldn't get placed under the .trash)
    client.delete(storageId, repositoryId, artifactRepositoryPathStr, true);
    final Path artifactFileInTrash = RepositoryFiles.trash(artifactRepositoryPath);
    final RootRepositoryPath repositoryPath = repositoryPathResolver.resolve(repository);
    final Path repositoryDir = repositoryPath.resolve(repositoryId).resolve(".trash");
    assertThat(Files.exists(artifactFileInTrash))
            .as("Failed to delete artifact during a force delete operation!")
            .isFalse();
    assertThat(Files.exists(repositoryDir.resolve(artifactRepositoryPathStr)))
            .as("Failed to delete artifact during a force delete operation!")
            .isFalse();
}