@Test public void sameTierViewsBelow() { String tierAlias = mMetaManager.getTiers().get(TEST_TIER_ORDINAL).getTierAlias(); List<StorageTierView> tierViews1 = mMetadataView.getTierViewsBelow(tierAlias); StorageDir dir = mMetaManager.getTiers().get(TEST_TIER_ORDINAL + 1).getDir(TEST_DIR); BlockMeta blockMeta = new BlockMeta(TEST_BLOCK_ID, TEST_BLOCK_SIZE, dir); try { dir.addBlockMeta(blockMeta); } catch (Exception e) { e.printStackTrace(); } List<StorageTier> tiers2 = mMetaManager.getTiersBelow(tierAlias); assertEquals(tierViews1.size(), tiers2.size()); for (int i = 0; i < tierViews1.size(); i++) { assertSameTierView((StorageTierEvictorView) tierViews1.get(i), new StorageTierEvictorView(tiers2.get(i), mMetadataView)); } }
public List<StorageTierView> getTierViewsBelow(String tierAlias) { int ordinal = getTierView(tierAlias).getTierViewOrdinal(); return mTierViews.subList(ordinal + 1, mTierViews.size()); }
BlockMetadataView { public List<StorageTierView> getTierViewsBelow(String tierAlias) { int ordinal = getTierView(tierAlias).getTierViewOrdinal(); return mTierViews.subList(ordinal + 1, mTierViews.size()); } }
BlockMetadataView { public List<StorageTierView> getTierViewsBelow(String tierAlias) { int ordinal = getTierView(tierAlias).getTierViewOrdinal(); return mTierViews.subList(ordinal + 1, mTierViews.size()); } BlockMetadataView(BlockMetadataManager manager);  BlockMetadataView(BlockMetadataManager manager, boolean useReservedSpace); }
BlockMetadataView { public List<StorageTierView> getTierViewsBelow(String tierAlias) { int ordinal = getTierView(tierAlias).getTierViewOrdinal(); return mTierViews.subList(ordinal + 1, mTierViews.size()); } BlockMetadataView(BlockMetadataManager manager);  BlockMetadataView(BlockMetadataManager manager, boolean useReservedSpace); StorageTierView getTierView(String tierAlias); List<StorageTierView> getTierViews(); @Nullable StorageTierView getNextTier(StorageTierView tierView); List<StorageTierView> getTierViewsBelow(String tierAlias); BlockMetadataView refreshView(); }
BlockMetadataView { public List<StorageTierView> getTierViewsBelow(String tierAlias) { int ordinal = getTierView(tierAlias).getTierViewOrdinal(); return mTierViews.subList(ordinal + 1, mTierViews.size()); } BlockMetadataView(BlockMetadataManager manager);  BlockMetadataView(BlockMetadataManager manager, boolean useReservedSpace); StorageTierView getTierView(String tierAlias); List<StorageTierView> getTierViews(); @Nullable StorageTierView getNextTier(StorageTierView tierView); List<StorageTierView> getTierViewsBelow(String tierAlias); BlockMetadataView refreshView();  }