@Test
public void testExtract() {

    val mmd = TestObjectMother.mappedMetricData();
    val metricData = mmd.getMetricData();
    val record = new ConsumerRecord<Object, Object>("some-topic", 1, 0, "some-key", mmd);
    val expectedTimestamp = metricData.getTimestamp() * 1000L;
    val actualTimestamp = new MappedMetricDataTimestampExtractor().extract(record, -1L);
    assertEquals(expectedTimestamp, actualTimestamp);
}