@Test public void shouldNotConsiderOptionsAsConcepts() { List<String> conceptNames = utils.parse(getModel("concepts_with_options.xml")); assertThat(conceptNames.size(), is(1)); assertThat(conceptNames, hasItem("MOST RECENT PAPANICOLAOU SMEAR RESULT")); }
public List<String> parse(String model) { try { if (StringUtils.isEmpty(model)) { return new ArrayList<>(); } parser.setInput(new ByteArrayInputStream(model.getBytes()), null); parser.nextTag(); return readConceptName(parser); } catch (Exception e) { throw new ParseConceptException(e); } }
ConceptParser { public List<String> parse(String model) { try { if (StringUtils.isEmpty(model)) { return new ArrayList<>(); } parser.setInput(new ByteArrayInputStream(model.getBytes()), null); parser.nextTag(); return readConceptName(parser); } catch (Exception e) { throw new ParseConceptException(e); } } }
ConceptParser { public List<String> parse(String model) { try { if (StringUtils.isEmpty(model)) { return new ArrayList<>(); } parser.setInput(new ByteArrayInputStream(model.getBytes()), null); parser.nextTag(); return readConceptName(parser); } catch (Exception e) { throw new ParseConceptException(e); } } ConceptParser();  ConceptParser(XmlPullParser parser); }
ConceptParser { public List<String> parse(String model) { try { if (StringUtils.isEmpty(model)) { return new ArrayList<>(); } parser.setInput(new ByteArrayInputStream(model.getBytes()), null); parser.nextTag(); return readConceptName(parser); } catch (Exception e) { throw new ParseConceptException(e); } } ConceptParser();  ConceptParser(XmlPullParser parser); List<String> parse(String model); }
ConceptParser { public List<String> parse(String model) { try { if (StringUtils.isEmpty(model)) { return new ArrayList<>(); } parser.setInput(new ByteArrayInputStream(model.getBytes()), null); parser.nextTag(); return readConceptName(parser); } catch (Exception e) { throw new ParseConceptException(e); } } ConceptParser();  ConceptParser(XmlPullParser parser); List<String> parse(String model);  }