@ExtendWith({ RepositoryManagementTestExecutionListener.class,

              ArtifactManagementTestExecutionListener.class })
@Test
public void testMavenDependencyGeneration(@MavenRepository(repositoryId = REPOSITORY_RELEASES,
                                                           setup = MavenIndexedRepositorySetup.class)
                                          Repository repository,
                                          @MavenTestArtifact(repositoryId = REPOSITORY_RELEASES,
                                                             id = GROUP_ID + ":" + ARTIFACT_ID,
                                                             versions = { VERSION_1 })
                                          Path artifactPath)
        throws ProviderImplementationException, IOException
{
    DependencySynonymFormatter formatter = compatibleDependencyFormatRegistry.getProviderImplementation(Maven2LayoutProvider.ALIAS,
                                                                                                        Maven2LayoutProvider.ALIAS);
    assertThat(formatter).as("Failed to look up dependency synonym formatter!").isNotNull();
    MavenArtifactCoordinates coordinates = (MavenArtifactCoordinates) RepositoryFiles.readCoordinates(
            (RepositoryPath) artifactPath.normalize());
    String snippet = formatter.getDependencySnippet(coordinates);
    System.out.println(snippet);
    assertThat(snippet)
            .as("Failed to generate dependency!")
            .isEqualTo("<dependency>\n" +
                       "    <groupId>org.carlspring.strongbox</groupId>\n" +
                       "    <artifactId>maven-snippet</artifactId>\n" +
                       "    <version>1.0</version>\n" +
                       "    <type>jar</type>\n" +
                       "    <scope>compile</scope>\n" +
                       "</dependency>\n");
}