### Question:
DownloadImpl implements Download, ComponentExporter { @Override public long getMaxContentSize() { return this.maxContentSize; }  @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 getMaxContentSize() { long expected = 1024L; ctx.currentResource("/content/download"); final Download download = ctx.request().adaptTo(Download.class); assertEquals(expected, download.getMaxContentSize()); }
@Test public void getMaxContentSize_EmptyAssets() { long expected = -1L; doReturn(new ArrayList<>()).when(actionHelper).getAssetsFromQueryParameter(ctx.request(), "path"); ctx.currentResource("/content/download"); final Download download = ctx.request().adaptTo(Download.class); assertEquals(expected, download.getMaxContentSize()); }