### Question:
AssetDownloadHelperImpl implements AssetDownloadHelper { @Override public long getMaxContentSizeLimit() { try { final Dictionary<String, Object> osgiConfigurationProperties = getAssetDownloadServletProperties(); if (osgiConfigurationProperties != null) { return PropertiesUtil.toLong(osgiConfigurationProperties.get(MAX_SIZE_PROPERTY), DEFAULT_SIZE_LIMIT); } else{ log.debug("No OSGi configuration properties could be found for service.pid [ {} ]", ASSET_DOWNLOAD_SERVLET_PID); } } catch (IOException | InvalidSyntaxException e) { log.error("Could not get max content size property for AEM's Asset Download Servlet", e); } return DEFAULT_SIZE_LIMIT; }  @Override long getMaxContentSizeLimit(); @Override long getAssetDownloadSize(Collection<AssetModel> assets, Resource configResource);  }### Answer:
@Test public void testGetMaxContentSizeLimit() { long expected = 52428800; final AssetDownloadHelper assetDownloadHelper = ctx.getService(AssetDownloadHelper.class); assertEquals(expected, assetDownloadHelper.getMaxContentSizeLimit()); }
@Test public void testGetMaxContentSizeLimit_NullConfig() throws IOException, InvalidSyntaxException { long expected = -1; doReturn(null).when(spyConfigurationAdmin).listConfigurations("(service.pid=" + ASSET_DOWNLOAD_SERVLET_PID + ")"); final AssetDownloadHelper assetDownloadHelper = ctx.getService(AssetDownloadHelper.class); assertEquals(expected, assetDownloadHelper.getMaxContentSizeLimit()); }