### Question:
ArchetypeGenerateCommand extends AbstractMavenCommand { @Override public Properties buildUserProperties() { final Properties properties = new Properties(); properties.setProperty(ARCHETYPE_GROUP_ID, archetypeGAV.getGroupId()); properties.setProperty(ARCHETYPE_ARTIFACT_ID, archetypeGAV.getArtifactId()); properties.setProperty(ARCHETYPE_VERSION, archetypeGAV.getVersion()); properties.setProperty(TEMPLATE_GROUP_ID, templateGAV.getGroupId()); properties.setProperty(TEMPLATE_ARTIFACT_ID, templateGAV.getArtifactId()); properties.setProperty(TEMPLATE_VERSION, templateGAV.getVersion()); properties.setProperty(ARCHETYPE_CATALOG, INTERNAL_CATALOG); return properties; } ArchetypeGenerateCommand(final String baseDirectory,
                                    final GAV archetypeGAV,
                                    final GAV templateGAV); @Override MavenRequest buildMavenRequest(); @Override Properties buildUserProperties(); static final List<String> GOALS; static final String ARCHETYPE_GROUP_ID; static final String ARCHETYPE_ARTIFACT_ID; static final String ARCHETYPE_VERSION; static final String TEMPLATE_GROUP_ID; static final String TEMPLATE_ARTIFACT_ID; static final String TEMPLATE_VERSION; static final String ARCHETYPE_CATALOG; static final String INTERNAL_CATALOG; }### Answer:
@Test public void buildUserPropertiesTest() { final GAV archetypeGav = createGav("archetype-group", "archetype-artifact", "archetype-version"); final GAV templateGav = createGav("template-group", "template-artifact", "template-version"); final ArchetypeGenerateCommand command = new ArchetypeGenerateCommand(BASE_DIRECTORY, archetypeGav, templateGav); final Properties properties = command.buildUserProperties(); assertThat(properties.getProperty(ArchetypeGenerateCommand.ARCHETYPE_GROUP_ID)).isEqualTo("archetype-group"); assertThat(properties.getProperty(ArchetypeGenerateCommand.ARCHETYPE_ARTIFACT_ID)).isEqualTo("archetype-artifact"); assertThat(properties.getProperty(ArchetypeGenerateCommand.ARCHETYPE_VERSION)).isEqualTo("archetype-version"); assertThat(properties.getProperty(ArchetypeGenerateCommand.TEMPLATE_GROUP_ID)).isEqualTo("template-group"); assertThat(properties.getProperty(ArchetypeGenerateCommand.TEMPLATE_ARTIFACT_ID)).isEqualTo("template-artifact"); assertThat(properties.getProperty(ArchetypeGenerateCommand.TEMPLATE_VERSION)).isEqualTo("template-version"); assertThat(properties.getProperty(ArchetypeGenerateCommand.ARCHETYPE_CATALOG)).isEqualTo(ArchetypeGenerateCommand.INTERNAL_CATALOG); }