PolicyDecisionPointImpl implements PolicyDecisionPoint { private void undeployPolicies(PDP pdp, List<Evaluatable> policies) { final PolicyRepository repo = (PolicyRepository) pdp .getPolicyRepository(); for (final Evaluatable policy : policies) { repo.undeploy(policy.getId()); } } PolicyDecisionPointImpl(PolicyProvider policyProvider,
			RequestGenerator requestGenerator,
			DocumentAccessor documentAccessor,
			DocumentXmlConverter documentXmlConverter, AuditService auditService);  PolicyDecisionPointImpl(RequestGenerator requestGenerator,
			DocumentAccessor documentAccessor,
			DocumentXmlConverter documentXmlConverter); @Override synchronized PdpRequestResponse evaluatePolicyForTrying(
			String xacmlPolicy, String purposeOfUse); @Override @Deprecated XacmlResponse evaluateRequest(PDP pdp, RequestType request,
			List<Evaluatable> policies, XacmlRequest xacmlRequest); @Override @Deprecated XacmlResponse evaluateRequest(PDP pdp, RequestType request,
			XacmlRequest xacmlRequest); @Override @Deprecated XacmlResponse evaluateRequest(RequestType request,
			List<Evaluatable> policies, XacmlRequest xacmlRequest); @Override XacmlResponse evaluateRequest(RequestType request,
			XacmlRequest xacmlRequest); @Override XacmlResponse evaluateRequest(XacmlRequest xacmlRequest);  }
@Test public void testUndeployPolicies() throws AuditException { final XacmlRequest xacmlRequest = new XacmlRequest(); final EvaluatableID id = policy.getId(); final List<EvaluatableID> ids = new LinkedList<EvaluatableID>(); ids.add(id); pdp.deployPolicies(simplePDP, policies, xacmlRequest, false); assertEquals( "PERMIT", pdp.evaluateRequest(simplePDP, request, new LinkedList<Evaluatable>(), xacmlRequest) .getPdpDecision()); pdp.undeployPoliciesById(simplePDP, ids); assertEquals( "NOT_APPLICABLE", pdp.evaluateRequest(simplePDP, request, new LinkedList<Evaluatable>(), xacmlRequest) .getPdpDecision()); }
@Test public void testUndeployPolicies() throws AuditException { XacmlRequest xacmlRequest = new XacmlRequest(); EvaluatableID id = policy.getId(); List<EvaluatableID> ids = new LinkedList<EvaluatableID>(); ids.add(id); pdp.deployPolicies(simplePDP, policies, xacmlRequest, false); assertEquals( "PERMIT", pdp.evaluateRequest(simplePDP, request, new LinkedList<Evaluatable>(), xacmlRequest).getPdpDecision()); pdp.undeployPoliciesById(simplePDP, ids); assertEquals( "NOT_APPLICABLE", pdp.evaluateRequest(simplePDP, request, new LinkedList<Evaluatable>(), xacmlRequest).getPdpDecision()); }