### Question:
ScanSummary { static long toMillis(long timestamp) { if (timestamp < 10000000000L) { return timestamp * 1000; } else if (timestamp < 10000000000000L) { return timestamp; } return timestamp / 1000; } private  ScanSummary(); static ScanSummary.Builder of(TableScan scan);  }### Answer:
@Test public void testToMillis() { long millis = 1542750947417L; Assert.assertEquals(1542750947000L, toMillis(millis / 1000)); Assert.assertEquals(1542750947417L, toMillis(millis)); Assert.assertEquals(1542750947417L, toMillis(millis * 1000 + 918)); }