### Question:
WxMpMaterialServiceImpl implements WxMpMaterialService { @Override public WxMpMaterialCountResult materialCount() throws WxErrorException { String responseText = this.wxMpService.get(MATERIAL_GET_COUNT_URL, null); WxError wxError = WxError.fromJson(responseText, WxType.MP); if (wxError.getErrorCode() == 0) { return WxMpGsonBuilder.create().fromJson(responseText, WxMpMaterialCountResult.class); } else { throw new WxErrorException(wxError); } } WxMpMaterialServiceImpl(WxMpService wxMpService); @Override WxMediaUploadResult mediaUpload(String mediaType, String fileType, InputStream inputStream); @Override WxMediaUploadResult mediaUpload(String mediaType, File file); @Override File mediaDownload(String mediaId); @Override WxMediaImgUploadResult mediaImgUpload(File file); @Override WxMpMaterialUploadResult materialFileUpload(String mediaType, WxMpMaterial material); @Override WxMpMaterialUploadResult materialNewsUpload(WxMpMaterialNews news); @Override InputStream materialImageOrVoiceDownload(String mediaId); @Override WxMpMaterialVideoInfoResult materialVideoInfo(String mediaId); @Override WxMpMaterialNews materialNewsInfo(String mediaId); @Override boolean materialNewsUpdate(WxMpMaterialArticleUpdate wxMpMaterialArticleUpdate); @Override boolean materialDelete(String mediaId); @Override WxMpMaterialCountResult materialCount(); @Override WxMpMaterialNewsBatchGetResult materialNewsBatchGet(int offset, int count); @Override WxMpMaterialFileBatchGetResult materialFileBatchGet(String type, int offset, int count);  }### Answer:
@Test(dependsOnMethods = {"testAddNews"}) public void testMaterialCount() throws WxErrorException { WxMpMaterialCountResult wxMaterialCountResult = this.wxService.getMaterialService().materialCount(); assertEquals( this.wxMaterialCountResultBeforeTest.getVoiceCount() + 1, wxMaterialCountResult.getVoiceCount()); assertEquals( this.wxMaterialCountResultBeforeTest.getVideoCount() + 1, wxMaterialCountResult.getVideoCount()); assertEquals( this.wxMaterialCountResultBeforeTest.getImageCount() + 2, wxMaterialCountResult.getImageCount()); assertEquals(this.wxMaterialCountResultBeforeTest.getNewsCount() + 2, wxMaterialCountResult.getNewsCount()); }