Assert.assertEquals(1, PolicyUtil.getProvided(ex).size());
}
@Test
public void testRequirePolicy() {
Exchange ex = new MockExchange().setContext(new MockContext());
PolicyUtil.require(ex, DummyPolicy.A);
Assert.assertTrue(PolicyUtil.isRequired(ex, DummyPolicy.A));
Assert.assertFalse(PolicyUtil.isRequired(ex, DummyPolicy.B));
Assert.assertFalse(PolicyUtil.isProvided(ex, DummyPolicy.A));
Assert.assertEquals(1, PolicyUtil.getRequired(ex).size());