@ExtendWith({ RepositoryManagementTestExecutionListener.class,

              ArtifactManagementTestExecutionListener.class })
@Test
public void testDeleteArtifactFile(@MavenRepository(repositoryId = REPOSITORY_RELEASES_1,
                                                    setup = MavenIndexedRepositorySetup.class)
                                   Repository repository,
                                   @MavenTestArtifact(repositoryId = REPOSITORY_RELEASES_1,
                                                      id = "com.artifacts.to.delete.releases:delete-foo",
                                                      versions = "1.2.1")
                                   Path artifactPath)
        throws Exception
{
    final RepositoryPath artifactRepositoryPath = (RepositoryPath) artifactPath.normalize();
    final String artifactRepositoryPathStr = RepositoryFiles.relativizePath(artifactRepositoryPath);
    assertThat(Files.exists(artifactRepositoryPath))
            .as("Failed to locate artifact file '" + artifactRepositoryPath + "'!")
            .isTrue();
    client.delete(repository.getStorage().getId(),
                  repository.getId(),
                  artifactRepositoryPathStr);
    assertThat(Files.notExists(artifactRepositoryPath))
            .as("Failed to delete artifact file '" + artifactRepositoryPath + "'!")
            .isTrue();
}