@Test public void getAuthorization() { Assert.assertNotNull( context.getAuthorization() ); Assert.assertNull( context.getAuthorization().getAuthorization() ); }
@Nonnull @Override public Authorization getAuthorization() { Authorization authorization = THREAD_LOCAL.get(); if ( authorization == null ) { authorization = new Authorization( null ); THREAD_LOCAL.set( authorization ); } return authorization; }
ThreadLocalAuthorizationContext implements AuthorizationContext { @Nonnull @Override public Authorization getAuthorization() { Authorization authorization = THREAD_LOCAL.get(); if ( authorization == null ) { authorization = new Authorization( null ); THREAD_LOCAL.set( authorization ); } return authorization; } }
ThreadLocalAuthorizationContext implements AuthorizationContext { @Nonnull @Override public Authorization getAuthorization() { Authorization authorization = THREAD_LOCAL.get(); if ( authorization == null ) { authorization = new Authorization( null ); THREAD_LOCAL.set( authorization ); } return authorization; }  }
ThreadLocalAuthorizationContext implements AuthorizationContext { @Nonnull @Override public Authorization getAuthorization() { Authorization authorization = THREAD_LOCAL.get(); if ( authorization == null ) { authorization = new Authorization( null ); THREAD_LOCAL.set( authorization ); } return authorization; }  @Nonnull @Override Authorization getAuthorization(); @Override void setAuthorization( @Nonnull Authorization authorization ); @Override void resetAuthorization(); }
ThreadLocalAuthorizationContext implements AuthorizationContext { @Nonnull @Override public Authorization getAuthorization() { Authorization authorization = THREAD_LOCAL.get(); if ( authorization == null ) { authorization = new Authorization( null ); THREAD_LOCAL.set( authorization ); } return authorization; }  @Nonnull @Override Authorization getAuthorization(); @Override void setAuthorization( @Nonnull Authorization authorization ); @Override void resetAuthorization();  }