Project { public Collection<ExtensionModel> getExtensionModels() { return extensionModels.values(); }  String getUrl(); void setUrl( String url ); String getName(); String getId(); void setId( String id ); String getDescription(); void setName( String name ); void setDescription( String description ); String getVersion(); void setVersion( String version ); String getScmUrl(); void setScmUrl( String scmUrl ); String getIssueTrackerUrl(); void setIssueTrackerUrl( String issueTrackerUrl ); ExtensionModel getExtensionModel( String extension ); Collection<ExtensionModel> getExtensionModels(); void addExtensionModel( ExtensionModel model ); void setSnapshotRepositoryUrl( String snapshotRepositoryUrl ); String getSnapshotRepositoryUrl(); void setRepositoryUrl( String repositoryUrl ); String getRepositoryUrl(); void setCiManagementUrl( String ciManagementUrl ); String getCiManagementUrl();  }
@Test public void testGetExtensionModels() { Project project = new Project(); MavenCoordinates coordinates = new MavenCoordinates(); project.addExtensionModel( coordinates ); ExtensionModel otherModel = new ExtensionModel() { public void setValuesFromMap( Map<String, String> values ) { } public Map<String, String> getValuesAsMap() { return Collections.emptyMap(); } public List<String> getKeys() { return Collections.emptyList(); } public String getId() { return "other-model"; } }; project.addExtensionModel( otherModel ); Collection<ExtensionModel> extensionModels = project.getExtensionModels(); assert extensionModels.size() == 2; assert extensionModels.contains( otherModel ); assert extensionModels.contains( coordinates ); }