### Question:
FunctionalDependencyRanking extends Ranking { protected void calculateGeneralCoverage(FunctionalDependencyResult result) { int referencedColumnCount = result.getDeterminant().getColumnIdentifiers().size(); int dependantColumnCount = result.getExtendedDependant().getColumnIdentifiers().size(); int tableCount; if (result.getDeterminantTableName().equals(result.getDependantTableName())) { tableCount = this.tableInformationMap.get(result.getDeterminantTableName()).getColumnCount(); } else { tableCount = this.tableInformationMap.get(result.getDeterminantTableName()).getColumnCount() + this.tableInformationMap.get(result.getDependantTableName()).getColumnCount(); } result.setGeneralCoverage(((float) referencedColumnCount + dependantColumnCount) / tableCount); } FunctionalDependencyRanking(List<FunctionalDependencyResult> results,
                                     Map<String, TableInformation> tableInformationMap); @Override void calculateDataIndependentRankings(); @Override void calculateDataDependentRankings(); Map<BitSet, PositionListIndex> createPLIs(TableInformation tableInformation);  }### Answer:
@Test public void testCalculateGeneralCoverage() throws Exception { setUpNormal(); FunctionalDependencyRanking ranking = new FunctionalDependencyRanking(functionalDependencyResults, tableInformationMap); FunctionalDependencyResult result = functionalDependencyResults.get(1); ranking.calculateGeneralCoverage(result); assertEquals(0.4, result.getGeneralCoverage(), 0.001); }