### Question:
RbacUserDetails implements UserDetails { @Override public Collection<? extends GrantedAuthority> getAuthorities() { return Collections.unmodifiableSet(privileges); } RbacUserDetails(final UserDetails delegate, final Set<GrantedAuthority> privileges); @Override Collection<? extends GrantedAuthority> getAuthorities(); @Override String getPassword(); @Override String getUsername(); @Override boolean isAccountNonExpired(); @Override boolean isAccountNonLocked(); @Override boolean isCredentialsNonExpired(); @Override boolean isEnabled(); UserDetails getDelegate(); @Override String toString();  }### Answer:
@Test public void testGetAuthorities() { assertThat(userDetails.getAuthorities(), is(privileges)); }