### Question:
MavenCli { String getResumeFromSelector( List<MavenProject> mavenProjects, MavenProject firstFailedProject ) { boolean hasOverlappingArtifactId = mavenProjects.stream() .filter( project -> firstFailedProject.getArtifactId().equals( project.getArtifactId() ) ) .count() > 1; if ( hasOverlappingArtifactId ) { return firstFailedProject.getGroupId() + ":" + firstFailedProject.getArtifactId(); } return ":" + firstFailedProject.getArtifactId(); } MavenCli();  MavenCli( ClassWorld classWorld ); static void main( String[] args ); static int main( String[] args, ClassWorld classWorld ); static int doMain( String[] args, ClassWorld classWorld ); int doMain( String[] args, String workingDirectory, PrintStream stdout, PrintStream stderr ); int doMain( CliRequest cliRequest ); static final String LOCAL_REPO_PROPERTY; static final String MULTIMODULE_PROJECT_DIRECTORY; static final String USER_HOME; static final File USER_MAVEN_CONFIGURATION_HOME; static final File DEFAULT_USER_TOOLCHAINS_FILE; static final File DEFAULT_GLOBAL_TOOLCHAINS_FILE; static final String STYLE_COLOR_PROPERTY; }### Answer:
@Test public void resumeFromSelectorIsSuggestedWithoutGroupId() { List<MavenProject> allProjects = asList( createMavenProject( "group", "module-a" ), createMavenProject( "group", "module-b" ) ); MavenProject failedProject = allProjects.get( 0 ); String selector = cli.getResumeFromSelector( allProjects, failedProject ); assertThat( selector, is( ":module-a" ) ); }
@Test public void resumeFromSelectorContainsGroupIdWhenArtifactIdIsNotUnique() { List<MavenProject> allProjects = asList( createMavenProject( "group-a", "module" ), createMavenProject( "group-b", "module" ) ); MavenProject failedProject = allProjects.get( 0 ); String selector = cli.getResumeFromSelector( allProjects, failedProject ); assertThat( selector, is( "group-a:module" ) ); }