CmdListBadges implements Command { public void collectIrForCs(Set<String> irSet, Set<String> cs) { if (this.badgeMap == null) { return; } for (String badge_id : cs) { BadgeDescription b = this.badgeMap.get(badge_id); if (b == null) { continue; } for (Map.Entry<String, InteroperabilityRequirement> entry : b.requirements.entrySet()) { irSet.add(entry.getKey()); } collectIrForCs(irSet, b.dependency); } }  @Override void execute(); void collectIrForCs(Set<String> irSet, Set<String> cs); InteroperabilityRequirement getIR(String irName); public Map<String, BadgeDescription> badgeMap; }
@Test public void testCollectIrForCs() { Set<String> irSet = new HashSet<>(); Set<String> cs = new HashSet<>(); cs.add("HelloWorld-2019"); cs.add("HLA-BASE-2019"); this.lb.collectIrForCs(irSet, cs); assertTrue("interoperability set should not be empty", irSet.size() > 0); }