ExperimentPageService { URI geneSpecificResultsLink(Experiment experiment, String gene, String accessKey, ExperimentPageRequestPreferences requestPreferences) { return callbackLinkWithRequestPreferences( MessageFormat.format("json/experiments/{0}/genes/{1}", experiment.getAccession(), gene), experiment.getType(), accessKey, requestPreferences); }  static Optional<String> getTheOnlyId(List<? extends Profile> profiles);  }
@Test public void testGeneSpecificResultsLink() { preferences.setCutoff(1.234); preferences.setSelectedColumnIds(ImmutableSet.of("g1", "g2")); URI result = new ExperimentPageService().geneSpecificResultsLink(experiment, "ENSG0000012345", "", preferences); assertThat(result.getPath(), is("json/experiments/E-MOCK-1/genes/ENSG0000012345")); assertThat(result.getQuery(), containsString("cutoff=1.234")); assertThat(result.getQuery(), containsString("selectedColumnIds=g1,g2")); assertThat(result.getQuery(), containsString("type=" + ExperimentType.RNASEQ_MRNA_BASELINE.name())); }