@Test public void shouldUseExistingTimestampHeaderInTimestampedEvent() { SimpleEvent base = new SimpleEvent(); Map<String, String> headersWithTimestamp = Maps.newHashMap(); headersWithTimestamp.put("timestamp", "-321"); base.setHeaders(headersWithTimestamp ); TimestampedEvent timestampedEvent = new TimestampedEvent(base); assertEquals(-321L, timestampedEvent.getTimestamp()); assertEquals("-321", timestampedEvent.getHeaders().get("timestamp")); }
long getTimestamp() { return timestamp; }
TimestampedEvent extends SimpleEvent { long getTimestamp() { return timestamp; } }
TimestampedEvent extends SimpleEvent { long getTimestamp() { return timestamp; } TimestampedEvent(Event base); }
TimestampedEvent extends SimpleEvent { long getTimestamp() { return timestamp; } TimestampedEvent(Event base);  }
TimestampedEvent extends SimpleEvent { long getTimestamp() { return timestamp; } TimestampedEvent(Event base);   }