### Question:
HdfsStatsService { public List<HdfsStats> getHdfsTimeSeriesStats(String cluster, String path, int limit, long starttime, long endtime) throws IOException { Scan scan = GenerateScanFuzzy(starttime, endtime, cluster, path); return createFromScanResults(cluster, path, scan, limit, Boolean.TRUE, starttime, endtime); } 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 testFuzzy() throws IOException { final long startts = 1392217200L; String cluster1 = "cluster1_timeseries"; String pathPrefix = "/dir_timeseries/dir12345"; String pathhello = "/hello1/hello2"; int numberStatsExpected = 5; loadTimeSeries(cluster1, pathPrefix, numberStatsExpected, startts); loadTimeSeries(cluster1, pathhello, numberStatsExpected, startts); String cluster4 = "yet_another_one"; String pathPrefix4 = "/dir_timeseries/dir12345"; int numberStatsExpected4 = 5; loadTimeSeries(cluster4, pathPrefix4, numberStatsExpected4, startts); String cluster3 = "abc_something_else"; String pathPrefix3 = "/dir_timeseries/dir12345"; int numberStatsExpected3 = 5; long endts3 = loadTimeSeries(cluster3, pathPrefix3, numberStatsExpected3, startts); HdfsStatsService hs = null; hs = new HdfsStatsService(UTIL.getConfiguration(), hbaseConnection); List<HdfsStats> h3 = hs.getHdfsTimeSeriesStats(cluster1, pathPrefix, Integer.MAX_VALUE, startts + 7200 * 3 + 1, startts - 3600); assertEquals(4, h3.size()); HdfsStatsService hs2 = new HdfsStatsService(UTIL.getConfiguration(), hbaseConnection); List<HdfsStats> h5 = hs2.getHdfsTimeSeriesStats(cluster3, pathPrefix3, Integer.MAX_VALUE, endts3, startts - 3600); assertEquals(numberStatsExpected3, h5.size()); }