*/
public class NotificationImplementationLoaderTestCase extends TestCase {
public void testRead() throws Exception {
try {
NotificationImplementationLoader implementationLoader =
new NotificationImplementationLoader(new DefaultNotificationImplementationFactory());
XMLStreamReader reader = EasyMock.createMock(XMLStreamReader.class);
EasyMock.expect(reader.getName()).andReturn(NotificationImplementationLoader.IMPLEMENTATION_NOTIFICATION).times(2);
EasyMock.expect(reader.getAttributeValue(null, "name")).andReturn("TrafficAdvisoryNotificationTestCase");
EasyMock.expect(reader.getAttributeValue(null, "type")).andReturn(null);
EasyMock.expect(reader.hasNext()).andReturn(true);
EasyMock.expect(reader.next()).andReturn(XMLStreamConstants.END_ELEMENT);
EasyMock.replay(reader);
Implementation impl = implementationLoader.read(reader);
Assert.assertNotNull(impl);
} catch(Throwable e) {
e.printStackTrace();
}
}