@ExtendWith({ RepositoryManagementTestExecutionListener.class,

              ArtifactManagementTestExecutionListener.class })
@Test
public void testForceDeleteArtifactNotAllowed(@MavenRepository(repositoryId = REPOSITORY_WITH_TRASH_1)
                                              @RepositoryAttributes(trashEnabled = true)
                                              Repository repository,
                                              @MavenTestArtifact(repositoryId = REPOSITORY_WITH_TRASH_1,
                                                                 id = "org.carlspring.strongbox:test-artifact-to-trash",
                                                                 versions = "1.0")
                                              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 should get placed under the .trash)
    client.delete(storageId, repositoryId, artifactRepositoryPathStr, false);
    final Path artifactFile = RepositoryFiles.trash(artifactRepositoryPath);
    logger.debug("Artifact file: {}", artifactFile.toAbsolutePath());
    assertThat(Files.exists(artifactFile))
            .as("Should have moved the artifact to the trash during a force delete operation, " +
               "when allowsForceDeletion is not enabled!")
            .isTrue();
    final RootRepositoryPath repositoryPath = repositoryPathResolver.resolve(repository);
    final Path repositoryIndexDir = repositoryPath.resolve(MavenRepositoryFeatures.INDEX);
    assertThat(Files.exists(repositoryIndexDir)).as("Should not have deleted .index directory!").isTrue();
}