@Test public void testExtract() { val metricData = TestObjectMother.metricData(); val record = new ConsumerRecord<Object, Object>("some-topic", 1, 0, "some-key", metricData); val expectedTimestamp = metricData.getTimestamp() * 1000L; val actualTimestamp = new MetricDataTimestampExtractor().extract(record, -1L); assertEquals(expectedTimestamp, actualTimestamp); }
@Override public long extract(ConsumerRecord<Object, Object> record, long previousTimestamp) { val metricData = (MetricData) record.value(); if (metricData == null) { return -1L; } return metricData.getTimestamp() * 1000L; }
MetricDataTimestampExtractor implements TimestampExtractor { @Override public long extract(ConsumerRecord<Object, Object> record, long previousTimestamp) { val metricData = (MetricData) record.value(); if (metricData == null) { return -1L; } return metricData.getTimestamp() * 1000L; } }
MetricDataTimestampExtractor implements TimestampExtractor { @Override public long extract(ConsumerRecord<Object, Object> record, long previousTimestamp) { val metricData = (MetricData) record.value(); if (metricData == null) { return -1L; } return metricData.getTimestamp() * 1000L; }  }
MetricDataTimestampExtractor implements TimestampExtractor { @Override public long extract(ConsumerRecord<Object, Object> record, long previousTimestamp) { val metricData = (MetricData) record.value(); if (metricData == null) { return -1L; } return metricData.getTimestamp() * 1000L; }  @Override long extract(ConsumerRecord<Object, Object> record, long previousTimestamp); }
MetricDataTimestampExtractor implements TimestampExtractor { @Override public long extract(ConsumerRecord<Object, Object> record, long previousTimestamp) { val metricData = (MetricData) record.value(); if (metricData == null) { return -1L; } return metricData.getTimestamp() * 1000L; }  @Override long extract(ConsumerRecord<Object, Object> record, long previousTimestamp);  }