### Question:
CostModelStrategy extends ParseStrategyBase { private void generateParsings() { generatedParsings = new LinkedList<Parsing>(); int numPossibleParsings = (int)Math.round(Math.pow(2, tokens.length-1)); for(int parsingIndex = 0; parsingIndex < numPossibleParsings ; parsingIndex++) { generatedParsings.add(new Parsing(tokens, parsingIndex)); } } CostModelStrategy(TokenizedString tokens,
                             ParseParameterSet parameterSet); void getDefaultLengthScorings(SolrParams invariants); @Override List<TreeMap<String,Object>> getOutput(); @Override TreeSet<Parsing> getUnfilteredParsings();  }### Answer:
@Test public void generateParsings(){ CostModelStrategy target = new CostModelStrategy(tokens, parameterSet); Deencapsulation.invoke(target, "generateParsings"); LinkedList<Parsing> result = Deencapsulation.getField(target, "generatedParsings"); int expectedSize = (int)Math.pow(2, tokens.length-1); Assert.assertEquals(result.size(), expectedSize); }