public NotificationReaderTest() {
super();
}
public void testReadBasicProperties() throws Exception {
DomainEvent domainEvent = new TestableDomainEvent(100, "testing");
Notification notification = new Notification(1, domainEvent);
NotificationSerializer serializer = NotificationSerializer.instance();
String serializedNotification = serializer.serialize(notification);
NotificationReader reader = new NotificationReader(serializedNotification);
assertEquals(1L, reader.notificationId());
assertEquals("1", reader.notificationIdAsString());
assertEquals(domainEvent.occurredOn(), reader.occurredOn());
assertEquals(notification.typeName(), reader.typeName());
assertEquals(notification.version(), reader.version());
assertEquals(domainEvent.eventVersion(), reader.version());
}