@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);
 }
 @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);
 }