final MavenResolvedArtifact[] resolvedArtifactInfos = Maven.resolver().addDependencies(dependencyA, dependencyB)
.resolve()
.withoutTransitivity().asResolvedArtifact();
// then
new ValidationUtil("test-deps-a-1.0.0.jar").validate(resolvedArtifactInfos[0].as(File.class));
assertEquals("jar", resolvedArtifactInfos[0].getExtension());
assertEquals("1.0.0", resolvedArtifactInfos[0].getResolvedVersion());
assertEquals(false, resolvedArtifactInfos[0].isSnapshotVersion());
assertEquals("jar", resolvedArtifactInfos[0].getExtension());
assertEquals(false, resolvedArtifactInfos[0].isOptional());
assertEquals(originalCoordinateA, resolvedArtifactInfos[0].getCoordinate());
new ValidationUtil("test-deps-b-1.0.0.jar").validate(resolvedArtifactInfos[1].as(File.class));
assertEquals("jar", resolvedArtifactInfos[1].getExtension());
assertEquals("1.0.0", resolvedArtifactInfos[1].getResolvedVersion());
assertEquals(false, resolvedArtifactInfos[1].isSnapshotVersion());
assertEquals("jar", resolvedArtifactInfos[1].getExtension());