ApplicationSet { public List<Version> getAllVersions(ApplicationId applicationId) { return applications.values().stream() .filter(application -> application.getId().equals(applicationId)) .map(Application::getVespaVersion) .sorted() .collect(Collectors.toList()); } private  ApplicationSet(List<Application> applicationList); Application getForVersionOrLatest(Optional<Version> optionalVersion, Instant now); Optional<Application> get(Version version); ApplicationId getId(); static ApplicationSet fromList(List<Application> applications); static ApplicationSet fromSingle(Application application); Collection<String> getAllHosts(); void updateHostMetrics(); long getApplicationGeneration(); List<Version> getAllVersions(ApplicationId applicationId);  }
@Test public void testGetAllVersions() { applicationSet = ApplicationSet.fromList(applications); assertEquals(List.of(Version.fromString("1.2.3"), Version.fromString("1.2.4"), Version.fromString("1.2.5")), applicationSet.getAllVersions(ApplicationId.defaultId())); }