@Test(expected = NullPointerException.class) public void exceptionsAreForwarded() throws ComponentLookupException { AuthorizationManager am = this.mocker.getInstance(AuthorizationManager.class); when(am.hasAccess(this.right, this.userProfile, this.doc)).thenThrow(new NullPointerException()); this.mocker.getComponentUnderTest().hasAccess(this.user, this.right, this.doc); }
@Override public Boolean hasAccess(User user, Right access, EntityReference entity) { return this.authorizationManager.hasAccess(access, user == null ? null : user.getProfileDocument(), entity); }
XWikiACLAuthorizationModule implements AuthorizationModule { @Override public Boolean hasAccess(User user, Right access, EntityReference entity) { return this.authorizationManager.hasAccess(access, user == null ? null : user.getProfileDocument(), entity); } }
XWikiACLAuthorizationModule implements AuthorizationModule { @Override public Boolean hasAccess(User user, Right access, EntityReference entity) { return this.authorizationManager.hasAccess(access, user == null ? null : user.getProfileDocument(), entity); }  }
XWikiACLAuthorizationModule implements AuthorizationModule { @Override public Boolean hasAccess(User user, Right access, EntityReference entity) { return this.authorizationManager.hasAccess(access, user == null ? null : user.getProfileDocument(), entity); }  @Override int getPriority(); @Override Boolean hasAccess(User user, Right access, EntityReference entity); }
XWikiACLAuthorizationModule implements AuthorizationModule { @Override public Boolean hasAccess(User user, Right access, EntityReference entity) { return this.authorizationManager.hasAccess(access, user == null ? null : user.getProfileDocument(), entity); }  @Override int getPriority(); @Override Boolean hasAccess(User user, Right access, EntityReference entity);  }