### Question:
DownloadImpl implements Download, ComponentExporter { public Collection<AssetModel> getAssets() { return Collections.unmodifiableCollection(assets); }  @Override List<AssetRenditionsGroup> getAssetRenditionsGroups(); Collection<AssetModel> getAssets(); String getZipFileName(); @Override long getMaxContentSize(); @Override long getDownloadContentSize(); @Override String getMaxContentSizeLabel(); @Override String getDownloadContentSizeLabel(); @Nonnull @Override String getExportedType(); static final String PN_ASSET_RENDITIONS_GROUP_TITLE; static final String NN_ASSET_RENDITIONS; static final String NN_ITEMS; }### Answer:
@Test public void getAssets() { ctx.currentResource("/content/download"); final Download download = ctx.request().adaptTo(Download.class); final Collection<AssetModel> models = download.getAssets(); assertNotNull(models); assertFalse(models.isEmpty()); assertEquals(2, models.size()); }
@Test public void getAssets_empty() { doReturn(new ArrayList<>()).when(actionHelper).getAssetsFromQueryParameter(ctx.request(), "path"); ctx.currentResource("/content/download"); final Download download = ctx.request().adaptTo(Download.class); final Collection<AssetModel> models = download.getAssets(); assertNotNull(models); assertTrue(models.isEmpty()); }