// prepare
MapVersionsPhase phase = (MapVersionsPhase) lookup( ReleasePhase.ROLE, TEST_MAP_BRANCH_VERSIONS );
List<MavenProject> reactorProjects = Collections.singletonList( createProject( "artifactId", "1.2" ) );
ReleaseDescriptor releaseDescriptor = new ReleaseDescriptor();
releaseDescriptor.setAutoVersionSubmodules( true );
releaseDescriptor.setBranchCreation( true );
releaseDescriptor.setInteractive( false );
// test
phase.simulate( releaseDescriptor, new DefaultReleaseEnvironment(), reactorProjects );
// verify
/*
* "By default, the POM in the new branch keeps the same version as the local working copy, and the local POM is incremented to the next revision."
* This is true for trunk, but when branching from a tag I would expect the next SNAPSHOT version. For now keep
* '1.2' instead of '1.3-SNAPSHOT' until further investigation.
*/
assertEquals( "Check release versions", Collections.singletonMap( "groupId:artifactId", "1.2" ),
releaseDescriptor.getReleaseVersions() );
assertNull( "Check development versions", releaseDescriptor.getDevelopmentVersions().get( "groupId:artifactId" ) );
}