### Question:
PercentileCreator implements StatisticCreator { public PercentileCreator( String[] options){ for (String opt : options) { try { postfix = opt; try { Integer.parseInt(opt); opt = opt+".0d"; } catch( Exception e) {} percentile = Double.parseDouble(opt); } catch( Exception e) { percentile = 90.0d; postfix= "90"; } } } PercentileCreator( String[] options); @SuppressWarnings("unchecked") @Override Object run(Object obj); @Override Stats run(HashMap<String, List<Long>> sortedResults);  }### Answer:
@Test public void testPercentileCreator() { try { PercentileCreator stddev = new PercentileCreator(new String[] {"50"}); HashMap<String, List<Long>> results = new HashMap<String, List<Long>>(); List<Long> sorted = new ArrayList<Long>(); sorted.add((long) 1300); sorted.add((long) 2000); sorted.add((long) 2400); sorted.add((long) 2300); sorted.add((long) 3000); results.put("test",sorted); Stats s = stddev.run(results); assertEquals("Failed to get proper Prctl", 2400.0d, s.getStatistic("prctl_50", "test"), 0.001); } catch (CucumberException e) { fail("CucumberException"); } }