### Question:
QueryCostBasedQueryHook extends NoOpDriverQueryHook { public RangeSet<T> parseRangeSet(String rangeStr) { if (rangeStr == null) { return null; } RangeSet<T> set = TreeRangeSet.create(); for (String range : rangeStr.split("U")) { set.add(parseRange(range)); } return set; }  RangeSet<T> parseAllowedRangeSet(String rangeStr); RangeSet<T> parseDisallowedRangeSet(String rangeStr); RangeSet<T> parseRangeSet(String rangeStr); Range<T> parseRange(String rangeStr); @Override void setDriver(LensDriver driver); @Override void postEstimate(AbstractQueryContext ctx); static final String ALLOWED_RANGE_SETS; static final String DISALLOWED_RANGE_SETS; }### Answer:
@Test(dataProvider = "provideParsingData") public void testParse(String rangeString, Double[] includes, Double[] excludes) { RangeSet<FactPartitionBasedQueryCost> range = hook.parseRangeSet(rangeString); for (Double cost : includes) { assertTrue(range.contains(new FactPartitionBasedQueryCost(cost))); } for (Double cost : excludes) { assertFalse(range.contains(new FactPartitionBasedQueryCost(cost))); } }