### Question:
Jive6ContributorProfileProvider implements ContributorProfileProvider { @SuppressWarnings("unchecked") protected List<ContributorProfile> convertToProfiles(byte[] data) { List<ContributorProfile> ret = new LinkedList<>(); Map<String, Object> map = convertJSONMap(data); List<Map<String, Object>> profiles = (List<Map<String, Object>>) map.get("list"); for (Map<String, Object> profile : profiles) { ContributorProfile contributorProfile = mapRawJsonData(profile); ret.add(contributorProfile); } return ret; }  @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 testConvertToProfiles() throws Exception { Jive6ContributorProfileProvider provider = getTested(); InputStream is = Jive6ContributorProfileProviderTest.class.getResourceAsStream("Jive6AllProfilesData.json"); List<ContributorProfile> profiles = provider.convertToProfiles(IOUtils.toByteArray(is)); ContributorProfile profile1 = profiles.get(0); Assert.assertEquals("Danielsds", profile1.getTypeSpecificCodes().get(ContributorProfileService.FIELD_TSC_JBOSSORG_USERNAME).get(0)); Assert.assertEquals("Danielsds", profile1.getFullName()); Assert.assertEquals("danielsds@fake.com", profile1.getPrimaryEmail()); ContributorProfile profile2 = profiles.get(1); Assert.assertEquals("dppsp", profile2.getTypeSpecificCodes().get(ContributorProfileService.FIELD_TSC_JBOSSORG_USERNAME).get(0)); Assert.assertEquals("dppsp", profile2.getFullName()); Assert.assertEquals("patrick@fake.com", profile2.getPrimaryEmail()); }