### Question:
OrderDependencyRanking extends Ranking { protected void calculateOccurrenceRatios(OrderDependencyResult result) { List<ColumnIdentifier> lhs = result.getLhs().getColumnIdentifiers(); result.setLhsOccurrenceRatio( calculateOccurrenceRatio(new HashSet<>(lhs), result.getLhsTableName())); List<ColumnIdentifier> rhs = result.getRhs().getColumnIdentifiers(); result.setRhsOccurrenceRatio( calculateOccurrenceRatio(new HashSet<>(rhs), result.getRhsTableName())); } OrderDependencyRanking(List<OrderDependencyResult> results,
                                Map<String, TableInformation> tableInformationMap); @Override void calculateDataIndependentRankings(); @Override void calculateDataDependentRankings();  }### Answer:
@Test public void testCalculateOccurrenceRatio() throws Exception { OrderDependencyRanking ranking = new OrderDependencyRanking(orderDependencyResults, tableInformationMap); OrderDependencyResult result = orderDependencyResults.get(0); ranking.calculateOccurrenceRatios(result); assertEquals(1.0, result.getLhsOccurrenceRatio(), 0.0); assertEquals(0.5, result.getRhsOccurrenceRatio(), 0.0); }