protected final <T> Callable<T> wrap(Callable<T> delegate) { return DelegatingSecurityContextCallable.create(delegate, securityContext); } }
protected final <T> Callable<T> wrap(Callable<T> delegate) { return DelegatingSecurityContextCallable.create(delegate, securityContext); } }
@Test(expected = IllegalArgumentException.class) public void createNullDelegate() { DelegatingSecurityContextCallable.create(null, securityContext); }
@Test public void create() throws Exception { callable = DelegatingSecurityContextCallable.create(delegate, securityContext); assertWrapped(callable); }
@Test public void createNullSecurityContext() throws Exception { SecurityContextHolder.setContext(securityContext); callable = DelegatingSecurityContextCallable.create(delegate, null); SecurityContextHolder.clearContext(); // ensure callable is what sets up the // SecurityContextHolder assertWrapped(callable); }
protected final <T> Callable<T> wrap(Callable<T> delegate) { return DelegatingSecurityContextCallable.create(delegate, securityContext); } }