@Test public void shouldUseExistingAtTimestampHeaderInTimestampedEvent() { SimpleEvent base = new SimpleEvent(); Map<String, String> headersWithTimestamp = Maps.newHashMap(); headersWithTimestamp.put("@timestamp", "-999"); base.setHeaders(headersWithTimestamp ); TimestampedEvent timestampedEvent = new TimestampedEvent(base); assertEquals(-999L, timestampedEvent.getTimestamp()); assertEquals("-999", timestampedEvent.getHeaders().get("@timestamp")); assertNull(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);   }