UniProtClient { protected Collection<String> parseResult(String entryString) { String ids = StringUtils.substringAfterLast(entryString, "\t"); if (!StringUtils.isBlank(ids)) { return Lists.newArrayList(Splitter.on(";").omitEmptyStrings().trimResults().split(ids)); } else { return Lists.newArrayList(); } } @Inject  UniProtClient(RestTemplate restTemplate); Collection<String> fetchReactomeIds(String uniprotId); static final String UNIPROT_URL; }
@Test public void testParseResultWithTwoIds() { Collection<String> strings = subject.parseResult("Entry\tCross-reference (reactome)\n" + "P05026\tREACT_15518;REACT_604;"); assertThat(strings, containsInAnyOrder("REACT_15518", "REACT_604")); }
@Test public void testParseResultWithOneId() { Collection<String> strings = subject.parseResult("Entry\tCross-reference (reactome)\n" + "Q8N349\tREACT_111102;\n"); assertThat(strings, containsInAnyOrder("REACT_111102")); }