public void testThreadLocalTransfer() throws InterruptedException, ExecutionException {
final Request request = new Request();
Dispatcher.REQUEST.set(request);
final LayerInfo layer = new LayerInfoImpl();
LocalLayer.set(layer);
final WorkspaceInfo ws = new WorkspaceInfoImpl();
LocalWorkspace.set(ws);
final Object myState = new Object();
AdminRequest.start(myState);
final Authentication auth = new UsernamePasswordAuthenticationToken("user", "password");
SecurityContextHolder.getContext().setAuthentication(auth);