### Question:
HdfsStatsService { public static long getEncodedRunId(long now) { long lastHour = now - (now % 3600); return (Long.MAX_VALUE - lastHour); } HdfsStatsService(Configuration hbaseConf, Connection hbaseConnection); static long getEncodedRunId(long now); List<HdfsStats> getAllDirs(String cluster, String pathPrefix,
      int limit, long runId); static long getOlderRunId(int i, long runId); List<HdfsStats> getHdfsTimeSeriesStats(String cluster, String path,
      int limit, long starttime, long endtime);  }### Answer:
@Test public void TestGetLastHourInvertedTimestamp() throws IOException { long ts = 1391896800L; long expectedTop = Long.MAX_VALUE - ts; long actualTop = HdfsStatsService.getEncodedRunId(ts); assertEquals(actualTop, expectedTop); }