### Question:
ParseUtils { public static void parseResourceAndStem(Set<String> candidates, Set<String> prefixStems, Set<String> suffixStems, Set<String> resources) { for (String candidate : candidates) { if (candidate.equals(Constants.RESOURCE_STEM_MARK)) { continue; } if (candidate.endsWith(Constants.RESOURCE_STEM_MARK)) { prefixStems.add(candidate.substring(0, candidate.length() - Constants.RESOURCE_STEM_MARK.length())); } else if (candidate.startsWith(Constants.RESOURCE_STEM_MARK)) { suffixStems.add(candidate.substring(Constants.RESOURCE_STEM_MARK.length())); } else { resources.add(candidate); } } }  static void parsePackageNodeAndStem(Set<String> candidates, Set<String> stems,
                                               Set<String> nodes); static void parseResourceAndStem(Set<String> candidates, Set<String> prefixStems,
                                            Set<String> suffixStems, Set<String> resources);  }### Answer:
@Test public void testParseUtils() { ParseUtils.parseResourceAndStem(candidates, stems, suffixStems, resources); Assert.assertTrue(stems.size() == 1 && stems.contains("spring/")); Assert.assertTrue(resources.size() == 1 && resources.contains("spring.xsd")); Assert.assertTrue(suffixStems.size() == 1 && suffixStems.contains(".xsd")); }