Bus bus = control.createMock(Bus.class);
DomainExpressionBuilderRegistry debr = control.createMock(DomainExpressionBuilderRegistry.class);
EasyMock.expect(bus.getExtension(DomainExpressionBuilderRegistry.class)).andReturn(debr);
EasyMock.expect(debr.build(EasyMock.isA(Element.class)))
.andThrow(new PolicyException(new Exception()));
URL url = ExternalAttachmentProviderTest.class.getResource("resources/attachments3.xml");
String uri = url.toExternalForm();
control.replay();
ExternalAttachmentProvider eap = new ExternalAttachmentProvider(bus);