### Question:
AuthoritiesNodeHelper { public Set<String> getAuthorities() { return Collections.unmodifiableSet(authItemsMap.keySet()); } AuthoritiesNodeHelper(List<AuthorityDTO> authorities); Boolean deleteAuthority(String authority); synchronized Boolean deleteItem(Integer id); Set<String> getAuthorities(); Set<Integer> getAuthoritiesItems(Set<AuthorityView> authorities); @SuppressWarnings("unchecked") void addAuthorityWithNodes(AuthorityDTO authority);  }### Answer:
@Test public void getAuthoritiesItemsNoDuplicated() { AuthorityDTO authority = createAuthority(); List<String> items = new ArrayList<String>(); items.add("1"); items.add("2"); items.add("3"); authority.setItems(items); List<AuthorityDTO> authorities = new ArrayList<AuthorityDTO>(); authorities.add(authority); authorities.add(authority); AuthoritiesNodeHelper helper = new AuthoritiesNodeHelper(authorities); assertNotNull(helper); Set<AuthorityView> auths = new HashSet<AuthorityView>(); auths.add(authority); assertTrue(helper.getAuthorities().size() == 1); }