LinkToPride extends ExternallyAvailableContent.Supplier<BaselineExperiment> { @Override public Collection<ExternallyAvailableContent> get(BaselineExperiment experiment) { return singleton(new ExternallyAvailableContent(formatLink.apply(experiment), createIcon.apply(experiment))); }  @Override Collection<ExternallyAvailableContent> get(BaselineExperiment experiment); @Override ExternallyAvailableContent.ContentType contentType();  }
@Test void iconAndLinkPointAtPride() { String accession = generateRandomPrideExperimentAccession(); when(baselineExperimentMock.getSecondaryAccession()).thenReturn(accession); assertThat(subject.get(baselineExperimentMock)) .hasSize(1) .first() .hasFieldOrProperty("uri") .hasFieldOrProperty("description"); assertThat(subject.get(baselineExperimentMock).iterator().next().uri) .hasToString("redirect:https: assertThat(subject.get(baselineExperimentMock).iterator().next().description) .hasFieldOrPropertyWithValue("type", "icon-pride") .hasFieldOrPropertyWithValue("description", "PRIDE Archive: project " + accession); }