### Question:
WSCKBMatchGraph extends AbstractMatchGraph<Concept, Boolean> { @Override public MatchTable<Concept, Boolean> partialMatch(Set<Concept> source, Set<Concept> target) { MatchTable<Concept, Boolean> matchTable = new MatchTable<Concept, Boolean>(); for(Concept tg : target){ for(Concept src : source){ if (kb.isSubclass(src, tg) || kb.equivalent(src, tg)){ matchTable.addMatch(src, tg, true); break; } } } return matchTable; } WSCKBMatchGraph(HierarchicalKnowledgeBase kb); @Override Set<Concept> getElements(); @Override Map<Concept, Boolean> getTargetElementsMatchedBy(Concept source); @Override Map<Concept, Boolean> getSourceElementsThatMatch(Concept target); @Override MatchTable<Concept, Boolean> partialMatch(Set<Concept> source, Set<Concept> target); @Override MatchTable<Concept, Boolean> fullMatch(Set<Concept> source, Set<Concept> target); @Override Boolean match(Concept source, Concept target);  }### Answer:
@Test public void testPartialMatch() throws Exception { Set<Concept> source = Collections.singleton(kb.getConcept("con864995873")); Set<Concept> expected = new HashSet<Concept>(); expected.add(kb.getConcept("con1428646343")); expected.add(kb.getConcept("con864995873")); expected.add(kb.getConcept("con241744282")); expected.add(kb.getConcept("con1988815758")); expected.add(kb.getConcept("con1627111892")); expected.add(kb.getConcept("con1226699739")); assertEquals(expected, matchGraph.partialMatch(source, expected).getTargetElements()); }