コード例 #1
0
 @Test
 public void testDisabled() {
   endpoints.setEnabled(false);
   expected.expect(ScimException.class);
   expected.expectMessage(containsString("Illegal operation."));
   endpoints.findUsers("id eq \"foo\"", "ascending", 0, 100, false);
 }
コード例 #2
0
 @SuppressWarnings("unchecked")
 @Before
 public void init() {
   endpoints.setScimUserEndpoints(scimUserEndpoints);
   endpoints.setEnabled(true);
   when(securityContextAccessor.getAuthorities()).thenReturn(authorities);
   when(securityContextAccessor.getAuthenticationInfo()).thenReturn("mock object");
   when(provisioning.retrieveActive(anyString()))
       .thenReturn(
           Collections.singletonList(MultitenancyFixture.identityProvider("test-origin", "uaa")));
   endpoints.setSecurityContextAccessor(securityContextAccessor);
 }