### Question:
FunctionalDependencyRanking extends Ranking { protected void calculateColumnRatios(FunctionalDependencyResult result) { int determinantColumnCount = result.getDeterminant().getColumnIdentifiers().size(); int dependantColumnCount = result.getExtendedDependant().getColumnIdentifiers().size(); int overallSize = dependantColumnCount + determinantColumnCount; result.setDeterminantColumnRatio((float) determinantColumnCount / overallSize); result.setDependantColumnRatio((float) dependantColumnCount / overallSize); } FunctionalDependencyRanking(List<FunctionalDependencyResult> results,
                                     Map<String, TableInformation> tableInformationMap); @Override void calculateDataIndependentRankings(); @Override void calculateDataDependentRankings(); Map<BitSet, PositionListIndex> createPLIs(TableInformation tableInformation);  }### Answer:
@Test public void testCalculateColumnRatios() throws Exception { setUpNormal(); FunctionalDependencyRanking ranking = new FunctionalDependencyRanking(functionalDependencyResults, tableInformationMap); FunctionalDependencyResult result = functionalDependencyResults.get(0); ranking.calculateColumnRatios(result); assertEquals(0.4, result.getDeterminantColumnRatio(), 0.001); assertEquals(0.6, result.getDependantColumnRatio(), 0.001); }