### Question:
FactPartition implements Comparable<FactPartition> { public String getFormattedFilter(String tableName) { return getFormattedFilter(partCol, tableName); } FactPartition(String partCol, Date partSpec, UpdatePeriod period,
    FactPartition containingPart, DateFormat partFormat);  FactPartition(String partCol, Date partSpec, UpdatePeriod period, FactPartition containingPart,
    DateFormat partFormat, Set<String> storageTables);  FactPartition(String partCol, TimePartition timePartition);  FactPartition(String partCol, TimePartition timePartition, FactPartition containingPart, Set<String>
    storageTables); FactPartition withoutContaining(); boolean hasContainingPart(); String getFormattedPartSpec(); FactPartition previous(); FactPartition next(); String getPartString(); String getFormattedFilter(String tableName); String getFormattedFilter(String partCol, String tableName); String getFilter(); @Override String toString(); int compareTo(FactPartition o); TimePartition getTimePartition(); double getAllTableWeights(ImmutableMap<String, Double> tableWeights);  }### Answer:
@Test public void testGetFormattedFilter() throws Exception { String dailyFormat = DAILY.format(DATE); String hourlyFormat = HOURLY.format(DATE); assertEquals(fp1.getFormattedFilter("table"), "table.p = '" + dailyFormat + "'"); assertEquals(fp2.getFormattedFilter("table2"), "table2.p = '" + dailyFormat + "' AND table2.q = '" + hourlyFormat + "'"); }