### Question:
FunctionalDependencyRanking extends Ranking { protected void calculateOccurrenceRatios(FunctionalDependencyResult result) { Set<ColumnIdentifier> dependant = result.getExtendedDependant().getColumnIdentifiers(); result.setDependantOccurrenceRatio( calculateOccurrenceRatio(dependant, result.getDependantTableName())); Set<ColumnIdentifier> determinant = result.getDeterminant().getColumnIdentifiers(); result.setDeterminantOccurrenceRatio( calculateOccurrenceRatio(determinant, result.getDeterminantTableName())); } FunctionalDependencyRanking(List<FunctionalDependencyResult> results,
                                     Map<String, TableInformation> tableInformationMap); @Override void calculateDataIndependentRankings(); @Override void calculateDataDependentRankings(); Map<BitSet, PositionListIndex> createPLIs(TableInformation tableInformation);  }### Answer:
@Test public void testCalculateOccurrenceRatio() throws Exception { setUpNormal(); FunctionalDependencyRanking ranking = new FunctionalDependencyRanking(functionalDependencyResults, tableInformationMap); FunctionalDependencyResult result = functionalDependencyResults.get(0); ranking.calculateOccurrenceRatios(result); assertEquals(0.4, result.getDeterminantOccurrenceRatio(), 0.001); assertEquals(1, result.getDependantOccurrenceRatio(), 0.001); }