### Question:
CatalogStorage extends Configured implements Storage { public String toPartitionFilter() { StringBuilder filter = new StringBuilder(); filter.append("("); for (Map.Entry<String, String> entry : partitions.entrySet()) { if (filter.length() > 1) { filter.append(PARTITION_SEPARATOR); } filter.append(entry.getKey()); filter.append(PARTITION_KEYVAL_SEPARATOR); filter.append(PARTITION_VALUE_QUOTE); filter.append(entry.getValue()); filter.append(PARTITION_VALUE_QUOTE); } filter.append(")"); return filter.toString(); } protected  CatalogStorage(Feed feed);  CatalogStorage(Cluster cluster, CatalogTable table); protected  CatalogStorage(String catalogUrl, CatalogTable table); protected  CatalogStorage(String catalogUrl, String tableUri); protected  CatalogStorage(String uriTemplate); protected  CatalogStorage(String uriTemplate, Configuration conf); String getCatalogUrl(); String getDatabase(); String getTable(); Map<String, String> getPartitions(); String getPartitionValue(String key); boolean hasPartition(String key); List<String> getDatedPartitionKeys(); String toPartitionFilter(); String toPartitionAsPath(); @Override TYPE getType(); @Override String getUriTemplate(); @Override String getUriTemplate(LocationType locationType); @Override boolean isIdentical(Storage toCompareAgainst); @Override void validateACL(AccessControlList acl); @Override List<FeedInstanceStatus> getListing(Feed feed, String clusterName, LocationType locationType,
                                               Date start, Date end); @Override FeedInstanceStatus.AvailabilityStatus getInstanceAvailabilityStatus(Feed feed, String clusterName,
                                         LocationType locationType, Date instanceTime); @Override StringBuilder evict(String retentionLimit, String timeZone, Path logFilePath); @Override String toString(); static final String PARTITION_SEPARATOR; static final String PARTITION_KEYVAL_SEPARATOR; static final String INPUT_PATH_SEPARATOR; static final String OUTPUT_PATH_SEPARATOR; static final String PARTITION_VALUE_QUOTE; static final String CATALOG_URL; }### Answer:
@Test public void testToPartitionFilter() throws Exception { final String catalogUrl = "thrift: String tableUri = "catalog:clicksdb:clicks#ds=20130918;region=us"; String partitionFilter = "(ds='20130918';region='us')"; CatalogStorage table = new CatalogStorage(catalogUrl, tableUri); Assert.assertEquals(table.toPartitionFilter(), partitionFilter); Assert.assertNotNull(table.getConf()); }