@ExtendWith({ RepositoryManagementTestExecutionListener.class,

              ArtifactManagementTestExecutionListener.class })
@Test
void provideArtifactHeaders(@MavenRepository(repositoryId = REPOSITORY_RELEASES_8)
                            Repository repository,
                            @MavenTestArtifact(repositoryId = REPOSITORY_RELEASES_8,
                                               id = "org.carlspring.strongbox:provide-artifact-headers",
                                               versions = "1.0")
                            Path artifactPath)
        throws IOException
{
    // Given
    HttpServletResponse response = new MockHttpServletResponse();
    RepositoryPath artifactRepositoryPath = (RepositoryPath) artifactPath.normalize();
    // When
    ArtifactControllerHelper.provideArtifactHeaders(response, artifactRepositoryPath);
    // Then
    assertThat(response.getHeader(HttpHeaders.CONTENT_LENGTH)).isNotEmpty();
    assertThat(response.getHeader(HttpHeaders.LAST_MODIFIED)).isNotEmpty();
    assertThat(response.getContentType()).isEqualTo(MediaType.APPLICATION_OCTET_STREAM_VALUE);
    assertThat(response.getHeader(HttpHeaders.ACCEPT_RANGES)).isEqualTo("bytes");
}