### Question:
DevicePrintDao { List<Map<String, Object>> getProfiles(AMIdentityWrapper amIdentity) throws IdRepoException, SSOException, IOException { Set<String> set = (Set<String>) amIdentity.getAttribute(LDAP_DEVICE_PRINT_ATTRIBUTE_NAME); List<Map<String, Object>> profiles = new ArrayList<Map<String, Object>>(); if (null != set) { for (String profile : set) { profiles.add(MAPPER.readValue(profile, Map.class)); } } return profiles; }    }### Answer:
@Test public void shouldGetProfiles() throws IOException, IdRepoException, SSOException { AMIdentityWrapper amIdentity = mock(AMIdentityWrapper.class); Set ldapProfiles = Collections.singleton("{}"); given(amIdentity.getAttribute("devicePrintProfiles")).willReturn(ldapProfiles); List<Map<String, Object>> profiles = devicePrintDao.getProfiles(amIdentity); assertThat(profiles).hasSize(1); }