ParsingJob implements Callable<ParsedName> { @VisibleForTesting String preClean(String name) { return preClean(name, pn.getWarnings()); } ParsingJob(String scientificName, Rank rank, NomCode code, ParserConfigs configs); @Override ParsedName call(); static String preClean(String name, @Nullable Set<String> warnings); static final String HYBRID_MARKER; static final Pattern HYBRID_FORMULA_PATTERN; static final String EXTINCT_MARKER; static final Pattern IS_VIRUS_PATTERN; static final Pattern IS_VIRUS_PATTERN_CASE_SENSITIVE; static final Pattern IS_GENE; static final Pattern NAME_PATTERN; }
@Test public void testClean1() throws Exception { assertEquals("", JOB.preClean("")); assertEquals("Hallo Spencer", JOB.preClean("Hallo Spencer ")); assertEquals("Hallo Spencer", JOB.preClean("' 'Hallo Spencer")); assertEquals("Hallo Spencer 1982", JOB.preClean("'\" Hallo Spencer 1982'")); }