@Test
public void testPublishErrorNotification() throws Exception {

    c.replay();
    EventProducer eventProducer = new EventProducer(bc);
    final Exception exportException = new Exception();
    ExportRegistrationImpl ereg = new ExportRegistrationImpl(exportException, closeHandler, eventProducer);
    eventProducer.publishNotification(Arrays.asList(ereg));
    RemoteServiceAdminEvent rsae = capturedEvent.getValue();
    Assert.assertSame(exportException, rsae.getException());
    Assert.assertEquals(RemoteServiceAdminEvent.EXPORT_ERROR, rsae.getType());
    Assert.assertSame(bundle, rsae.getSource());
    Assert.assertNull(rsae.getImportReference());
    Assert.assertNull(rsae.getExportReference());
    c.verify();
}