AuditDbQuery { void parseAndSetArguments() throws ParseException, IOException { groupBy = new GroupBy(groupByString); filter = new Filter(filterString); fromTime = getDate(fromTimeString); toTime = getDate(toTimeString); percentileSet = getPercentileList(percentileString); } AuditDbQuery(String toTimeString, String fromTimeString,
      String filterString, String groupByString, String timeZone);  AuditDbQuery(String toTimeString, String fromTimeString,
      String filterString, String groupByString, String timeZone,
      String percentileString);  AuditDbQuery(String toTimeString, String fromTimeString,
      String filterString, String groupByString, String timeZone,
      String percentileString, ClientConfig config);  AuditDbQuery(String toTimeString, String fromTimeString,
      String filterString, String groupByString, String timeZone,
      String percentileString, ClientConfig config, AuditDBHelper helper); static Map<Tuple, Map<Float, Integer>> populatePercentileMap(Set<Tuple> tupleSet, Set<Float> percentileSet); void execute(); static void main(String args[]); @Override String toString(); void displayResults(); @Deprecated Map<GroupBy.Group, Long> getReceived(); @Deprecated Map<GroupBy.Group, Long> getSent(); Map<Tuple, Map<Float, Integer>> getPercentile(); Set<Tuple> getTupleSet(); Set<Float> getPercentileSet();  }
@Test public void testPercentileListNotNull() { Date fromDate = new Date(); Date toDate = new Date(fromDate.getTime()+60000000l); AuditDbQuery query = new AuditDbQuery(formatter.format(toDate), formatter.format(fromDate), "", "TIER,TOPIC,HOSTNAME", null, "95,99," + "99.9,99.99"); Set<Float> expectedSet = new HashSet<Float>(); expectedSet.add(95.00f); expectedSet.add(99.00f); expectedSet.add(99.90f); expectedSet.add(99.99f); try { query.parseAndSetArguments(); } catch (Exception e) { e.printStackTrace(); } Assert.assertTrue(query.percentileSet != null); Assert.assertEquals(4, query.percentileSet.size()); Assert.assertTrue(query.percentileSet.containsAll(expectedSet)); }
@Test public void testPercentileSetIsNull() { Date fromDate = new Date(); Date toDate = new Date(fromDate.getTime()+60000000l); AuditDbQuery query = new AuditDbQuery(formatter.format(toDate), formatter.format(fromDate), "", "TIER,TOPIC,HOSTNAME", null); try { query.parseAndSetArguments(); } catch (Exception e) { e.printStackTrace(); } Assert.assertTrue(query.percentileSet == null); }