public class PolicyUtilTest {
@Test
public void testProvidePolicy() {
Exchange ex = new MockExchange().setContext(new MockContext());
PolicyUtil.provide(ex, DummyPolicy.A);
Assert.assertTrue(PolicyUtil.isProvided(ex, DummyPolicy.A));
Assert.assertFalse(PolicyUtil.isProvided(ex, DummyPolicy.B));
Assert.assertFalse(PolicyUtil.isRequired(ex, DummyPolicy.B));
Assert.assertEquals(1, PolicyUtil.getProvided(ex).size());