public class PentahoSecurityContextHolderStrategyTest {
@Test
public void testGetContext() throws Exception {
final PentahoSecurityContextHolderStrategy strategy = new PentahoSecurityContextHolderStrategy();
SecurityContext context = strategy.getContext();
assertNotNull( context );
final Authentication authentication = mock( Authentication.class );
context.setAuthentication( authentication );
assertSame( authentication, strategy.getContext().getAuthentication() );
Thread thread = new Thread( new Runnable() {
@Override public void run() {
assertSame( authentication, strategy.getContext().getAuthentication() );