@Test
public void shouldReturnExpectedArtifactGroups()
        throws IOException
{

    RepositoryPath path = new RepositoryPath(REPOSITORY_BASEDIR, repositoryFileSystem).resolve("org")
                                                                                      .resolve("carlspring")
                                                                                      .resolve("abs-lay-prov-test")
                                                                                      .resolve("1.8")
                                                                                      .resolve("abs-lay-prov-test-1.8.jar");
    Set<ArtifactGroupEntry> artifactGroups = layoutProvider.getArtifactGroups(path);
    assertThat(artifactGroups).isNotNull();
    assertThat(artifactGroups).isEmpty();
    RepositoryArtifactIdGroupEntry repositoryArtifactIdGroup = artifactGroupService.findOneOrCreate("storage0",
                                                                                                    "releases",
                                                                                                    "abs-lay-prov-test");
    artifactGroups = layoutProvider.getArtifactGroups(path);
    assertThat(artifactGroups).isNotNull();
    assertThat(artifactGroups).hasSize((1));
    assertThat(artifactGroups.iterator().next()).isEqualTo(repositoryArtifactIdGroup);
    assertThat(repositoryArtifactIdGroup).isInstanceOf(RepositoryArtifactIdGroupEntry.class);
    assertThat(repositoryArtifactIdGroup.getArtifactId()).isEqualTo(("abs-lay-prov-test"));
    assertThat(repositoryArtifactIdGroup.getRepositoryId()).isEqualTo(("releases"));
    assertThat(repositoryArtifactIdGroup.getStorageId()).isEqualTo(("storage0"));
    assertThat(repositoryArtifactIdGroup.getClass()).isEqualTo((RepositoryArtifactIdGroupEntry.class));
}