this.resolveContext = mock(ResolveContext.class);
when(this.resolveContext.getResourceResolver()).thenReturn(this.resourceResolver);
this.security = mock(ResourceAccessSecurity.class);
this.queryLanguageProvider = mock(QueryLanguageProvider.class);
this.resourceProvider = mock(ResourceProvider.class);
<BUG>when(resourceProvider.getQueryLanguageProvider()).thenReturn(this.queryLanguageProvider);
useRAS = false;</BUG>
final ResourceAccessSecurityTracker securityTracker = new ResourceAccessSecurityTracker() {
@Override
public ResourceAccessSecurity getApplicationResourceAccessSecurity() {

this.resolveContext = mock(ResolveContext.class);
when(this.resolveContext.getResourceResolver()).thenReturn(this.resourceResolver);
this.security = mock(ResourceAccessSecurity.class);
this.queryLanguageProvider = mock(QueryLanguageProvider.class);
this.resourceProvider = mock(ResourceProvider.class);
when(resourceProvider.getQueryLanguageProvider()).thenReturn(this.queryLanguageProvider);
final ResourceProviderHandler handler = mock(ResourceProviderHandler.class);
when(handler.getResourceProvider()).thenReturn(this.resourceProvider);
useRAS = false;
final ResourceAccessSecurityTracker securityTracker = new ResourceAccessSecurityTracker() {
@Override
public ResourceAccessSecurity getApplicationResourceAccessSecurity() {
