@Test
public void testFindOrThrow() throws Exception {

  PresentationPolicyAlternatives ppa =
      (PresentationPolicyAlternatives) XmlUtils.getObjectFromXML(getClass().getResourceAsStream(
          "/eu/abc4trust/sampleXml/presentationPolicies/presentationPolicyAlternativesHotel.xml"), true);
  MyPresentationPolicyAlternatives myppa = new MyPresentationPolicyAlternatives(ppa);
  
  URI policyUri1 = new URI("http://www.sweetdreamsuites.com/policies/booking/standard");
  MyPresentationPolicy res = myppa.findOrThrow(policyUri1);
  assertEquals(policyUri1, res.getPolicyUri());
  
  URI policyUri2 = new URI("blabla");
  try {
    myppa.findOrThrow(policyUri2);
    fail("Expected TokenVerificationException");
  } catch(TokenVerificationException ex) {
    // expected
    assertTrue(ex.getMessage().contains("Cannot find"));
  }
}