@Test public void loadUserByCrn() { User user = User.newBuilder().setCrn("userCrn").setEmail("dummyuser@cloudera.com").setUserId("1").build(); when(mockedUmsClient.getUserDetails(eq(userCrn), eq(userCrn), any())).thenReturn(user); UserDetails userDetails = underTest.loadUserByUsername(userCrn); assertTrue(userDetails.getAuthorities().iterator().next().getAuthority().equals("CRN_USER")); }
@Override public CrnUser loadUserByUsername(String crn) throws UsernameNotFoundException { return getUmsUser(crn); }
CrnUserDetailsService implements UserDetailsService { @Override public CrnUser loadUserByUsername(String crn) throws UsernameNotFoundException { return getUmsUser(crn); } }
CrnUserDetailsService implements UserDetailsService { @Override public CrnUser loadUserByUsername(String crn) throws UsernameNotFoundException { return getUmsUser(crn); } CrnUserDetailsService(GrpcUmsClient umsClient); }
CrnUserDetailsService implements UserDetailsService { @Override public CrnUser loadUserByUsername(String crn) throws UsernameNotFoundException { return getUmsUser(crn); } CrnUserDetailsService(GrpcUmsClient umsClient); @Override CrnUser loadUserByUsername(String crn); }
CrnUserDetailsService implements UserDetailsService { @Override public CrnUser loadUserByUsername(String crn) throws UsernameNotFoundException { return getUmsUser(crn); } CrnUserDetailsService(GrpcUmsClient umsClient); @Override CrnUser loadUserByUsername(String crn);  }