@Test public void testMakeDecisionForTryingPolicy() { final String purposeOfUse = "purposeOfUse"; final String xacmlPolicy = "xacmlPolic"; final PdpRequestResponse pdpResp = mock(PdpRequestResponse.class); when( policyDesicionPoint.evaluatePolicyForTrying(xacmlPolicy, purposeOfUse)).thenReturn(pdpResp); final PdpRequestResponse resp = sut.makeDecisionForTryingPolicy( xacmlPolicy, purposeOfUse); verify(policyDesicionPoint, times(1)).evaluatePolicyForTrying( xacmlPolicy, purposeOfUse); assertEquals(pdpResp, resp); }
@Override public PdpRequestResponse makeDecisionForTryingPolicy(String xacmlPolicy, String purposeOfUse) { LOGGER.debug("", "makeDecisionForTryingPolicy(xacmlPolicy) is invoked"); Assert.hasText(xacmlPolicy, "Xaml policy is not set"); return policyDesicionPoint.evaluatePolicyForTrying(xacmlPolicy, purposeOfUse); }
ContextHandlerImpl implements ContextHandler { @Override public PdpRequestResponse makeDecisionForTryingPolicy(String xacmlPolicy, String purposeOfUse) { LOGGER.debug("", "makeDecisionForTryingPolicy(xacmlPolicy) is invoked"); Assert.hasText(xacmlPolicy, "Xaml policy is not set"); return policyDesicionPoint.evaluatePolicyForTrying(xacmlPolicy, purposeOfUse); } }
ContextHandlerImpl implements ContextHandler { @Override public PdpRequestResponse makeDecisionForTryingPolicy(String xacmlPolicy, String purposeOfUse) { LOGGER.debug("", "makeDecisionForTryingPolicy(xacmlPolicy) is invoked"); Assert.hasText(xacmlPolicy, "Xaml policy is not set"); return policyDesicionPoint.evaluatePolicyForTrying(xacmlPolicy, purposeOfUse); } ContextHandlerImpl(PolicyDecisionPoint policyDesicionPoint); }
ContextHandlerImpl implements ContextHandler { @Override public PdpRequestResponse makeDecisionForTryingPolicy(String xacmlPolicy, String purposeOfUse) { LOGGER.debug("", "makeDecisionForTryingPolicy(xacmlPolicy) is invoked"); Assert.hasText(xacmlPolicy, "Xaml policy is not set"); return policyDesicionPoint.evaluatePolicyForTrying(xacmlPolicy, purposeOfUse); } ContextHandlerImpl(PolicyDecisionPoint policyDesicionPoint); @Override XacmlResponse enforcePolicy(XacmlRequest xacmlRequest); @Override PdpRequestResponse makeDecisionForTryingPolicy(String xacmlPolicy,
			String purposeOfUse); }
ContextHandlerImpl implements ContextHandler { @Override public PdpRequestResponse makeDecisionForTryingPolicy(String xacmlPolicy, String purposeOfUse) { LOGGER.debug("", "makeDecisionForTryingPolicy(xacmlPolicy) is invoked"); Assert.hasText(xacmlPolicy, "Xaml policy is not set"); return policyDesicionPoint.evaluatePolicyForTrying(xacmlPolicy, purposeOfUse); } ContextHandlerImpl(PolicyDecisionPoint policyDesicionPoint); @Override XacmlResponse enforcePolicy(XacmlRequest xacmlRequest); @Override PdpRequestResponse makeDecisionForTryingPolicy(String xacmlPolicy,
			String purposeOfUse);  }