### Question:
Jive6ContributorProfileProvider implements ContributorProfileProvider { protected void addTypeSpecificCode(Map<String, List<String>> typeSpecificCodes, String fieldTcsName, String value) { value = SearchUtils.trimToNull(value); if (value != null) { List<String> vl = typeSpecificCodes.get(fieldTcsName); if (vl == null) { vl = new ArrayList<>(); typeSpecificCodes.put(fieldTcsName, vl); } if (!vl.contains(value)) vl.add(value); } }  @PostConstruct void init(); @Override List<ContributorProfile> getAllProfiles(Integer start, Integer size); @Override ContributorProfile getProfile(String jbossorgUsername); @PreDestroy void destroy(); static final String JIVE_PROFILE_REST_API; static final String JIVE_ALL_PROFILES_REST_API; }### Answer:
@Test public void addTypeSpecificCode() { Jive6ContributorProfileProvider tested = getTested(); Map<String, List<String>> typeSpecificCodes = new HashMap<>(); tested.addTypeSpecificCode(typeSpecificCodes, "a", null); Assert.assertTrue(typeSpecificCodes.isEmpty()); tested.addTypeSpecificCode(typeSpecificCodes, "a", " "); Assert.assertTrue(typeSpecificCodes.isEmpty()); tested.addTypeSpecificCode(typeSpecificCodes, "a", "v1"); tested.addTypeSpecificCode(typeSpecificCodes, "a", " v2 "); tested.addTypeSpecificCode(typeSpecificCodes, "a", "v1"); tested.addTypeSpecificCode(typeSpecificCodes, "b", "v1"); tested.addTypeSpecificCode(typeSpecificCodes, "b", "v1 "); Assert.assertEquals(2, typeSpecificCodes.size()); Assert.assertEquals(2, typeSpecificCodes.get("a").size()); Assert.assertTrue(typeSpecificCodes.get("a").contains("v1")); Assert.assertTrue(typeSpecificCodes.get("a").contains("v2")); Assert.assertEquals(1, typeSpecificCodes.get("b").size()); Assert.assertTrue(typeSpecificCodes.get("b").contains("v1")); }