@Test public void testEnforcePolicy() throws AuditException, NoPolicyFoundException, PolicyProviderException { final XacmlRequest xacmlRequest = mock(XacmlRequest.class); final XacmlResponse xacmlResponse = mock(XacmlResponse.class); when(policyDesicionPoint.evaluateRequest(xacmlRequest)).thenReturn( xacmlResponse); final XacmlResponse response = sut.enforcePolicy(xacmlRequest); verify(policyDesicionPoint, times(1)).evaluateRequest(xacmlRequest); assertEquals(xacmlResponse, response); }
@Override public XacmlResponse enforcePolicy(XacmlRequest xacmlRequest) throws AuditException, NoPolicyFoundException, PolicyProviderException { LOGGER.debug(xacmlRequest.getMessageId(), "policyDesicionPoint.evaluateRequest(xacmlRequest) is invoked"); return policyDesicionPoint.evaluateRequest(xacmlRequest); }
ContextHandlerImpl implements ContextHandler { @Override public XacmlResponse enforcePolicy(XacmlRequest xacmlRequest) throws AuditException, NoPolicyFoundException, PolicyProviderException { LOGGER.debug(xacmlRequest.getMessageId(), "policyDesicionPoint.evaluateRequest(xacmlRequest) is invoked"); return policyDesicionPoint.evaluateRequest(xacmlRequest); } }
ContextHandlerImpl implements ContextHandler { @Override public XacmlResponse enforcePolicy(XacmlRequest xacmlRequest) throws AuditException, NoPolicyFoundException, PolicyProviderException { LOGGER.debug(xacmlRequest.getMessageId(), "policyDesicionPoint.evaluateRequest(xacmlRequest) is invoked"); return policyDesicionPoint.evaluateRequest(xacmlRequest); } ContextHandlerImpl(PolicyDecisionPoint policyDesicionPoint); }
ContextHandlerImpl implements ContextHandler { @Override public XacmlResponse enforcePolicy(XacmlRequest xacmlRequest) throws AuditException, NoPolicyFoundException, PolicyProviderException { LOGGER.debug(xacmlRequest.getMessageId(), "policyDesicionPoint.evaluateRequest(xacmlRequest) is invoked"); return policyDesicionPoint.evaluateRequest(xacmlRequest); } ContextHandlerImpl(PolicyDecisionPoint policyDesicionPoint); @Override XacmlResponse enforcePolicy(XacmlRequest xacmlRequest); @Override PdpRequestResponse makeDecisionForTryingPolicy(String xacmlPolicy,
			String purposeOfUse); }
ContextHandlerImpl implements ContextHandler { @Override public XacmlResponse enforcePolicy(XacmlRequest xacmlRequest) throws AuditException, NoPolicyFoundException, PolicyProviderException { LOGGER.debug(xacmlRequest.getMessageId(), "policyDesicionPoint.evaluateRequest(xacmlRequest) is invoked"); return policyDesicionPoint.evaluateRequest(xacmlRequest); } ContextHandlerImpl(PolicyDecisionPoint policyDesicionPoint); @Override XacmlResponse enforcePolicy(XacmlRequest xacmlRequest); @Override PdpRequestResponse makeDecisionForTryingPolicy(String xacmlPolicy,
			String purposeOfUse);  }