### Question:
FileSystemStorage extends Configured implements Storage { public List<Location> getLocations() { return locations; } FileSystemStorage(Feed feed); protected  FileSystemStorage(String storageUrl, Locations locations); protected  FileSystemStorage(String storageUrl, List<Location> locations); protected  FileSystemStorage(String uriTemplate); @Override TYPE getType(); String getStorageUrl(); List<Location> getLocations(); @Override String getUriTemplate(); @Override String getUriTemplate(LocationType locationType); String getUriTemplate(LocationType locationType, List<Location> locationList); Path getWorkingDir(); @Override boolean isIdentical(Storage toCompareAgainst); static Location getLocation(List<Location> locations, LocationType type); @Override void validateACL(AccessControlList acl); @Override StringBuilder evict(String retentionLimit, String timeZone, Path logFilePath); @Override @SuppressWarnings("MagicConstant") 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); FileStatus getFileStatus(FileSystem fileSystem, Path feedInstancePath); Configuration getConf(); @Override String toString(); static final String FEED_PATH_SEP; static final String LOCATION_TYPE_SEP; static final String FILE_SYSTEM_URL; }### Answer:
@Test (dataProvider = "testListingDataProvider") public void testInstanceListing(String availabilityFlag, Frequency frequency, TimeZone timeZone, Date start, Date end) throws Exception { EmbeddedCluster firstCluster = EmbeddedCluster.newCluster(TEST_FEED_LISTING, false); FileSystem fs = firstCluster.getFileSystem(); ConfigurationStore.get().publish(EntityType.CLUSTER, firstCluster.getCluster()); EmbeddedCluster secondCluster = EmbeddedCluster.newCluster(TEST_FEED_INSTANCE_LISTING, false); ConfigurationStore.get().publish(EntityType.CLUSTER, secondCluster.getCluster()); try { Feed feed = getFeed(availabilityFlag, frequency, timeZone); Cluster cluster = new Cluster(); cluster.setName(TEST_FEED_INSTANCE_LISTING); feed.getClusters().getClusters().add(cluster); Validity validity = new Validity(); cluster.setValidity(validity); validity.setStart(new Date(System.currentTimeMillis() - (1000L * 24 * 3600000))); validity.setEnd(new Date(System.currentTimeMillis() - (1000L * 21 * 3600000))); Locations locations = new Locations(); Location dataLocation = new Location(); dataLocation.setPath("/TestFeedInstanceListing/data/${YEAR}/${MONTH}/${DAY}" + (frequency.getTimeUnit() == Frequency.TimeUnit.hours ? "/${HOUR}" : "") + "/MORE"); dataLocation.setType(LocationType.DATA); locations.getLocations().add(dataLocation); cluster.setLocations(locations); List<FeedInstanceStatus> expected = prepareData(fs, feed, start, end); FeedInstanceResult actual = FeedHelper.getFeedInstanceListing(feed, start, end); Assert.assertEquals(actual.getInstances().length, expected.size()); } finally { ConfigurationStore.get().remove(EntityType.CLUSTER, firstCluster.getCluster().getName()); ConfigurationStore.get().remove(EntityType.CLUSTER, secondCluster.getCluster().getName()); } }