### Question:
WxMpMassMessageServiceImpl implements WxMpMassMessageService { @Override public WxMpMassSendResult massOpenIdsMessageSend(WxMpMassOpenIdsMessage message) throws WxErrorException { String responseContent = this.wxMpService.post(MESSAGE_MASS_SEND_URL, message.toJson()); return WxMpMassSendResult.fromJson(responseContent); } WxMpMassMessageServiceImpl(WxMpService wxMpService); @Override WxMpMassUploadResult massNewsUpload(WxMpMassNews news); @Override WxMpMassUploadResult massVideoUpload(WxMpMassVideo video); @Override WxMpMassSendResult massGroupMessageSend(WxMpMassTagMessage message); @Override WxMpMassSendResult massOpenIdsMessageSend(WxMpMassOpenIdsMessage message); @Override WxMpMassSendResult massMessagePreview(WxMpMassPreviewMessage wxMpMassPreviewMessage); @Override void delete(Long msgId, Integer articleIndex);  }### Answer:
@Test public void testTextMassOpenIdsMessageSend() throws WxErrorException { TestConfigStorage configProvider = (TestConfigStorage) this.wxService .getWxMpConfigStorage(); WxMpMassOpenIdsMessage massMessage = new WxMpMassOpenIdsMessage(); massMessage.setMsgType(WxConsts.MassMsgType.TEXT); massMessage.setContent("测试群发消息\n欢迎欢迎，热烈欢迎\n换行测试\n超链接:<a href=\"http: massMessage.getToUsers().add(configProvider.getOpenid()); WxMpMassSendResult massResult = this.wxService.getMassMessageService() .massOpenIdsMessageSend(massMessage); assertNotNull(massResult); assertNotNull(massResult.getMsgId()); }
@Test(dataProvider = "massMessages") public void testMediaMassOpenIdsMessageSend(String massMsgType, String mediaId) throws WxErrorException { TestConfigStorage configProvider = (TestConfigStorage) this.wxService .getWxMpConfigStorage(); WxMpMassOpenIdsMessage massMessage = new WxMpMassOpenIdsMessage(); massMessage.setMsgType(massMsgType); massMessage.setMediaId(mediaId); massMessage.getToUsers().add(configProvider.getOpenid()); WxMpMassSendResult massResult = this.wxService.getMassMessageService() .massOpenIdsMessageSend(massMessage); assertNotNull(massResult); assertNotNull(massResult.getMsgId()); }