修复由于静态引用SimpleDateFormat导致线程不安全的代码

This commit is contained in:
BinaryWang
2016-09-09 09:43:01 +08:00
parent 3ab8a3c7c6
commit f66c0b02e2
6 changed files with 102 additions and 71 deletions

View File

@ -3,18 +3,26 @@ package me.chanjar.weixin.mp.api;
import me.chanjar.weixin.common.bean.WxJsapiSignature;
import me.chanjar.weixin.common.exception.WxErrorException;
import me.chanjar.weixin.common.util.http.RequestExecutor;
import me.chanjar.weixin.mp.bean.*;
import me.chanjar.weixin.mp.bean.result.*;
import java.text.SimpleDateFormat;
import me.chanjar.weixin.mp.bean.WxMpCustomMessage;
import me.chanjar.weixin.mp.bean.WxMpIndustry;
import me.chanjar.weixin.mp.bean.WxMpMassGroupMessage;
import me.chanjar.weixin.mp.bean.WxMpMassNews;
import me.chanjar.weixin.mp.bean.WxMpMassOpenIdsMessage;
import me.chanjar.weixin.mp.bean.WxMpMassPreviewMessage;
import me.chanjar.weixin.mp.bean.WxMpMassVideo;
import me.chanjar.weixin.mp.bean.WxMpSemanticQuery;
import me.chanjar.weixin.mp.bean.WxMpTemplateMessage;
import me.chanjar.weixin.mp.bean.result.WxMpMassSendResult;
import me.chanjar.weixin.mp.bean.result.WxMpMassUploadResult;
import me.chanjar.weixin.mp.bean.result.WxMpOAuth2AccessToken;
import me.chanjar.weixin.mp.bean.result.WxMpSemanticQueryResult;
import me.chanjar.weixin.mp.bean.result.WxMpUser;
/**
* 微信API的Service
*/
public interface WxMpService {
SimpleDateFormat SIMPLE_DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd");
/**
* <pre>
* 验证推送过来的消息的正确性

View File

@ -1,8 +1,17 @@
package me.chanjar.weixin.mp.api.impl;
import java.text.Format;
import java.util.Date;
import java.util.List;
import org.apache.commons.lang3.time.FastDateFormat;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import com.google.gson.reflect.TypeToken;
import me.chanjar.weixin.common.exception.WxErrorException;
import me.chanjar.weixin.mp.api.WxMpDataCubeService;
import me.chanjar.weixin.mp.api.WxMpService;
@ -13,11 +22,6 @@ import me.chanjar.weixin.mp.bean.datacube.WxDataCubeMsgResult;
import me.chanjar.weixin.mp.bean.datacube.WxDataCubeUserCumulate;
import me.chanjar.weixin.mp.bean.datacube.WxDataCubeUserSummary;
import me.chanjar.weixin.mp.util.json.WxMpGsonBuilder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.Date;
import java.util.List;
/**
* Created by Binary Wang on 2016/8/23.
@ -27,6 +31,9 @@ public class WxMpDataCubeServiceImpl implements WxMpDataCubeService {
protected final Logger log = LoggerFactory.getLogger(WxMpDataCubeServiceImpl.class);
private static final String API_URL_PREFIX = "https://api.weixin.qq.com/datacube";
private final Format dateFormat = FastDateFormat.getInstance("yyyy-MM-dd");
private WxMpService wxMpService;
public WxMpDataCubeServiceImpl(WxMpService wxMpService) {
@ -37,8 +44,8 @@ public class WxMpDataCubeServiceImpl implements WxMpDataCubeService {
public List<WxDataCubeUserSummary> getUserSummary(Date beginDate, Date endDate) throws WxErrorException {
String url = API_URL_PREFIX + "/getusersummary";
JsonObject param = new JsonObject();
param.addProperty("begin_date", WxMpService.SIMPLE_DATE_FORMAT.format(beginDate));
param.addProperty("end_date", WxMpService.SIMPLE_DATE_FORMAT.format(endDate));
param.addProperty("begin_date", this.dateFormat.format(beginDate));
param.addProperty("end_date", this.dateFormat.format(endDate));
String responseContent = this.wxMpService.post(url, param.toString());
this.log.debug("\nurl:{}\nparams:{}\nresponse:{}",url, param, responseContent);
return WxMpGsonBuilder.INSTANCE.create().fromJson(new JsonParser().parse(responseContent).getAsJsonObject().get("list"),
@ -50,8 +57,8 @@ public class WxMpDataCubeServiceImpl implements WxMpDataCubeService {
public List<WxDataCubeUserCumulate> getUserCumulate(Date beginDate, Date endDate) throws WxErrorException {
String url = API_URL_PREFIX + "/getusercumulate";
JsonObject param = new JsonObject();
param.addProperty("begin_date", WxMpService.SIMPLE_DATE_FORMAT.format(beginDate));
param.addProperty("end_date", WxMpService.SIMPLE_DATE_FORMAT.format(endDate));
param.addProperty("begin_date", this.dateFormat.format(beginDate));
param.addProperty("end_date", this.dateFormat.format(endDate));
String responseContent = this.wxMpService.post(url, param.toString());
this.log.debug("\nurl:{}\nparams:{}\nresponse:{}",url, param, responseContent);
return WxMpGsonBuilder.INSTANCE.create().fromJson(new JsonParser().parse(responseContent).getAsJsonObject().get("list"),
@ -63,8 +70,8 @@ public class WxMpDataCubeServiceImpl implements WxMpDataCubeService {
public List<WxDataCubeArticleResult> getArticleSummary(Date beginDate, Date endDate) throws WxErrorException {
String url = API_URL_PREFIX + "/getarticlesummary";
JsonObject param = new JsonObject();
param.addProperty("begin_date", WxMpService.SIMPLE_DATE_FORMAT.format(beginDate));
param.addProperty("end_date", WxMpService.SIMPLE_DATE_FORMAT.format(endDate));
param.addProperty("begin_date", this.dateFormat.format(beginDate));
param.addProperty("end_date", this.dateFormat.format(endDate));
String responseContent = this.wxMpService.post(url, param.toString());
this.log.debug("\nurl:{}\nparams:{}\nresponse:{}",url, param, responseContent);
return WxMpGsonBuilder.INSTANCE.create().fromJson(new JsonParser().parse(responseContent).getAsJsonObject().get("list"),
@ -76,8 +83,8 @@ public class WxMpDataCubeServiceImpl implements WxMpDataCubeService {
public List<WxDataCubeArticleTotal> getArticleTotal(Date beginDate, Date endDate) throws WxErrorException {
String url = API_URL_PREFIX + "/getarticletotal";
JsonObject param = new JsonObject();
param.addProperty("begin_date", WxMpService.SIMPLE_DATE_FORMAT.format(beginDate));
param.addProperty("end_date", WxMpService.SIMPLE_DATE_FORMAT.format(endDate));
param.addProperty("begin_date", this.dateFormat.format(beginDate));
param.addProperty("end_date", this.dateFormat.format(endDate));
String responseContent = this.wxMpService.post(url, param.toString());
this.log.debug("\nurl:{}\nparams:{}\nresponse:{}",url, param, responseContent);
return WxMpGsonBuilder.INSTANCE.create().fromJson(new JsonParser().parse(responseContent).getAsJsonObject().get("list"),
@ -89,8 +96,8 @@ public class WxMpDataCubeServiceImpl implements WxMpDataCubeService {
public List<WxDataCubeArticleResult> getUserRead(Date beginDate, Date endDate) throws WxErrorException {
String url = API_URL_PREFIX + "/getuserread";
JsonObject param = new JsonObject();
param.addProperty("begin_date", WxMpService.SIMPLE_DATE_FORMAT.format(beginDate));
param.addProperty("end_date", WxMpService.SIMPLE_DATE_FORMAT.format(endDate));
param.addProperty("begin_date", this.dateFormat.format(beginDate));
param.addProperty("end_date", this.dateFormat.format(endDate));
String responseContent = this.wxMpService.post(url, param.toString());
this.log.debug("\nurl:{}\nparams:{}\nresponse:{}",url, param, responseContent);
return WxMpGsonBuilder.INSTANCE.create().fromJson(new JsonParser().parse(responseContent).getAsJsonObject().get("list"),
@ -102,8 +109,8 @@ public class WxMpDataCubeServiceImpl implements WxMpDataCubeService {
public List<WxDataCubeArticleResult> getUserReadHour(Date beginDate, Date endDate) throws WxErrorException {
String url = API_URL_PREFIX + "/getuserreadhour";
JsonObject param = new JsonObject();
param.addProperty("begin_date", WxMpService.SIMPLE_DATE_FORMAT.format(beginDate));
param.addProperty("end_date", WxMpService.SIMPLE_DATE_FORMAT.format(endDate));
param.addProperty("begin_date", this.dateFormat.format(beginDate));
param.addProperty("end_date", this.dateFormat.format(endDate));
String responseContent = this.wxMpService.post(url, param.toString());
this.log.debug("\nurl:{}\nparams:{}\nresponse:{}",url, param, responseContent);
return WxMpGsonBuilder.INSTANCE.create().fromJson(new JsonParser().parse(responseContent).getAsJsonObject().get("list"),
@ -115,8 +122,8 @@ public class WxMpDataCubeServiceImpl implements WxMpDataCubeService {
public List<WxDataCubeArticleResult> getUserShare(Date beginDate, Date endDate) throws WxErrorException {
String url = API_URL_PREFIX + "/getusershare";
JsonObject param = new JsonObject();
param.addProperty("begin_date", WxMpService.SIMPLE_DATE_FORMAT.format(beginDate));
param.addProperty("end_date", WxMpService.SIMPLE_DATE_FORMAT.format(endDate));
param.addProperty("begin_date", this.dateFormat.format(beginDate));
param.addProperty("end_date", this.dateFormat.format(endDate));
String responseContent = this.wxMpService.post(url, param.toString());
this.log.debug("\nurl:{}\nparams:{}\nresponse:{}",url, param, responseContent);
return WxMpGsonBuilder.INSTANCE.create().fromJson(new JsonParser().parse(responseContent).getAsJsonObject().get("list"),
@ -128,8 +135,8 @@ public class WxMpDataCubeServiceImpl implements WxMpDataCubeService {
public List<WxDataCubeArticleResult> getUserShareHour(Date beginDate, Date endDate) throws WxErrorException {
String url = API_URL_PREFIX + "/getusersharehour";
JsonObject param = new JsonObject();
param.addProperty("begin_date", WxMpService.SIMPLE_DATE_FORMAT.format(beginDate));
param.addProperty("end_date", WxMpService.SIMPLE_DATE_FORMAT.format(endDate));
param.addProperty("begin_date", this.dateFormat.format(beginDate));
param.addProperty("end_date", this.dateFormat.format(endDate));
String responseContent = this.wxMpService.post(url, param.toString());
this.log.debug("\nurl:{}\nparams:{}\nresponse:{}",url, param, responseContent);
return WxMpGsonBuilder.INSTANCE.create().fromJson(new JsonParser().parse(responseContent).getAsJsonObject().get("list"),
@ -142,8 +149,8 @@ public class WxMpDataCubeServiceImpl implements WxMpDataCubeService {
throws WxErrorException {
String url = API_URL_PREFIX + "/getupstreammsg";
JsonObject param = new JsonObject();
param.addProperty("begin_date", WxMpService.SIMPLE_DATE_FORMAT.format(beginDate));
param.addProperty("end_date", WxMpService.SIMPLE_DATE_FORMAT.format(endDate));
param.addProperty("begin_date", this.dateFormat.format(beginDate));
param.addProperty("end_date", this.dateFormat.format(endDate));
String responseContent = this.wxMpService.post(url, param.toString());
this.log.debug("\nurl:{}\nparams:{}\nresponse:{}",url, param, responseContent);
return WxMpGsonBuilder.INSTANCE.create().fromJson(new JsonParser().parse(responseContent).getAsJsonObject().get("list"),
@ -156,8 +163,8 @@ public class WxMpDataCubeServiceImpl implements WxMpDataCubeService {
Date endDate) throws WxErrorException {
String url = API_URL_PREFIX + "/getupstreammsghour";
JsonObject param = new JsonObject();
param.addProperty("begin_date", WxMpService.SIMPLE_DATE_FORMAT.format(beginDate));
param.addProperty("end_date", WxMpService.SIMPLE_DATE_FORMAT.format(endDate));
param.addProperty("begin_date", this.dateFormat.format(beginDate));
param.addProperty("end_date", this.dateFormat.format(endDate));
String responseContent = this.wxMpService.post(url, param.toString());
this.log.debug("\nurl:{}\nparams:{}\nresponse:{}",url, param, responseContent);
return WxMpGsonBuilder.INSTANCE.create().fromJson(new JsonParser().parse(responseContent).getAsJsonObject().get("list"),
@ -170,8 +177,8 @@ public class WxMpDataCubeServiceImpl implements WxMpDataCubeService {
Date endDate) throws WxErrorException {
String url = API_URL_PREFIX + "/getupstreammsgweek";
JsonObject param = new JsonObject();
param.addProperty("begin_date", WxMpService.SIMPLE_DATE_FORMAT.format(beginDate));
param.addProperty("end_date", WxMpService.SIMPLE_DATE_FORMAT.format(endDate));
param.addProperty("begin_date", this.dateFormat.format(beginDate));
param.addProperty("end_date", this.dateFormat.format(endDate));
String responseContent = this.wxMpService.post(url, param.toString());
this.log.debug("\nurl:{}\nparams:{}\nresponse:{}",url, param, responseContent);
return WxMpGsonBuilder.INSTANCE.create().fromJson(new JsonParser().parse(responseContent).getAsJsonObject().get("list"),
@ -184,8 +191,8 @@ public class WxMpDataCubeServiceImpl implements WxMpDataCubeService {
Date endDate) throws WxErrorException {
String url = API_URL_PREFIX + "/getupstreammsgmonth";
JsonObject param = new JsonObject();
param.addProperty("begin_date", WxMpService.SIMPLE_DATE_FORMAT.format(beginDate));
param.addProperty("end_date", WxMpService.SIMPLE_DATE_FORMAT.format(endDate));
param.addProperty("begin_date", this.dateFormat.format(beginDate));
param.addProperty("end_date", this.dateFormat.format(endDate));
String responseContent = this.wxMpService.post(url, param.toString());
this.log.debug("\nurl:{}\nparams:{}\nresponse:{}",url, param, responseContent);
return WxMpGsonBuilder.INSTANCE.create().fromJson(new JsonParser().parse(responseContent).getAsJsonObject().get("list"),
@ -198,8 +205,8 @@ public class WxMpDataCubeServiceImpl implements WxMpDataCubeService {
Date endDate) throws WxErrorException {
String url = API_URL_PREFIX + "/getupstreammsgdist";
JsonObject param = new JsonObject();
param.addProperty("begin_date", WxMpService.SIMPLE_DATE_FORMAT.format(beginDate));
param.addProperty("end_date", WxMpService.SIMPLE_DATE_FORMAT.format(endDate));
param.addProperty("begin_date", this.dateFormat.format(beginDate));
param.addProperty("end_date", this.dateFormat.format(endDate));
String responseContent = this.wxMpService.post(url, param.toString());
this.log.debug("\nurl:{}\nparams:{}\nresponse:{}",url, param, responseContent);
return WxMpGsonBuilder.INSTANCE.create().fromJson(new JsonParser().parse(responseContent).getAsJsonObject().get("list"),
@ -212,8 +219,8 @@ public class WxMpDataCubeServiceImpl implements WxMpDataCubeService {
Date endDate) throws WxErrorException {
String url = API_URL_PREFIX + "/getupstreammsgdistweek";
JsonObject param = new JsonObject();
param.addProperty("begin_date", WxMpService.SIMPLE_DATE_FORMAT.format(beginDate));
param.addProperty("end_date", WxMpService.SIMPLE_DATE_FORMAT.format(endDate));
param.addProperty("begin_date", this.dateFormat.format(beginDate));
param.addProperty("end_date", this.dateFormat.format(endDate));
String responseContent = this.wxMpService.post(url, param.toString());
this.log.debug("\nurl:{}\nparams:{}\nresponse:{}",url, param, responseContent);
return WxMpGsonBuilder.INSTANCE.create().fromJson(new JsonParser().parse(responseContent).getAsJsonObject().get("list"),
@ -226,8 +233,8 @@ public class WxMpDataCubeServiceImpl implements WxMpDataCubeService {
Date endDate) throws WxErrorException {
String url = API_URL_PREFIX + "/getupstreammsgdistmonth";
JsonObject param = new JsonObject();
param.addProperty("begin_date", WxMpService.SIMPLE_DATE_FORMAT.format(beginDate));
param.addProperty("end_date", WxMpService.SIMPLE_DATE_FORMAT.format(endDate));
param.addProperty("begin_date", this.dateFormat.format(beginDate));
param.addProperty("end_date", this.dateFormat.format(endDate));
String responseContent = this.wxMpService.post(url, param.toString());
this.log.debug("\nurl:{}\nparams:{}\nresponse:{}",url, param, responseContent);
return WxMpGsonBuilder.INSTANCE.create().fromJson(new JsonParser().parse(responseContent).getAsJsonObject().get("list"),
@ -240,8 +247,8 @@ public class WxMpDataCubeServiceImpl implements WxMpDataCubeService {
Date endDate) throws WxErrorException {
String url = API_URL_PREFIX + "/getinterfacesummary";
JsonObject param = new JsonObject();
param.addProperty("begin_date", WxMpService.SIMPLE_DATE_FORMAT.format(beginDate));
param.addProperty("end_date", WxMpService.SIMPLE_DATE_FORMAT.format(endDate));
param.addProperty("begin_date", this.dateFormat.format(beginDate));
param.addProperty("end_date", this.dateFormat.format(endDate));
String responseContent = this.wxMpService.post(url, param.toString());
this.log.debug("\nurl:{}\nparams:{}\nresponse:{}",url, param, responseContent);
return WxMpGsonBuilder.INSTANCE.create().fromJson(new JsonParser().parse(responseContent).getAsJsonObject().get("list"),
@ -254,8 +261,8 @@ public class WxMpDataCubeServiceImpl implements WxMpDataCubeService {
Date endDate) throws WxErrorException {
String url = API_URL_PREFIX + "/getinterfacesummaryhour";
JsonObject param = new JsonObject();
param.addProperty("begin_date", WxMpService.SIMPLE_DATE_FORMAT.format(beginDate));
param.addProperty("end_date", WxMpService.SIMPLE_DATE_FORMAT.format(endDate));
param.addProperty("begin_date", this.dateFormat.format(beginDate));
param.addProperty("end_date", this.dateFormat.format(endDate));
String responseContent = this.wxMpService.post(url, param.toString());
this.log.debug("\nurl:{}\nparams:{}\nresponse:{}",url, param, responseContent);
return WxMpGsonBuilder.INSTANCE.create().fromJson(new JsonParser().parse(responseContent).getAsJsonObject().get("list"),

View File

@ -1,7 +1,9 @@
package me.chanjar.weixin.mp.util.json;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.text.Format;
import org.apache.commons.lang3.time.FastDateFormat;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.JsonSerializer;
@ -11,7 +13,7 @@ import com.fasterxml.jackson.databind.SerializerProvider;
* Created by Binary Wang on 2016/7/13.
*/
public class WxLongTimeJsonSerializer extends JsonSerializer<Long> {
private static SimpleDateFormat DF = new SimpleDateFormat(
private static Format DF = FastDateFormat.getInstance(
"yyyy-MM-dd HH:mm:ss");
@Override

View File

@ -8,13 +8,19 @@
*/
package me.chanjar.weixin.mp.util.json;
import com.google.gson.*;
import me.chanjar.weixin.common.util.json.GsonHelper;
import me.chanjar.weixin.mp.bean.datacube.WxDataCubeUserCumulate;
import java.lang.reflect.Type;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import org.apache.commons.lang3.time.FastDateFormat;
import com.google.gson.JsonDeserializationContext;
import com.google.gson.JsonDeserializer;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonParseException;
import me.chanjar.weixin.common.util.json.GsonHelper;
import me.chanjar.weixin.mp.bean.datacube.WxDataCubeUserCumulate;
/**
*
@ -23,7 +29,8 @@ import java.text.SimpleDateFormat;
*/
public class WxMpUserCumulateGsonAdapter implements JsonDeserializer<WxDataCubeUserCumulate> {
private static final SimpleDateFormat SIMPLE_DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd");
private static final FastDateFormat SIMPLE_DATE_FORMAT = FastDateFormat
.getInstance("yyyy-MM-dd");
@Override
public WxDataCubeUserCumulate deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException {

View File

@ -8,20 +8,27 @@
*/
package me.chanjar.weixin.mp.util.json;
import com.google.gson.*;
import me.chanjar.weixin.common.util.json.GsonHelper;
import me.chanjar.weixin.mp.bean.datacube.WxDataCubeUserSummary;
import java.lang.reflect.Type;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import org.apache.commons.lang3.time.FastDateFormat;
import com.google.gson.JsonDeserializationContext;
import com.google.gson.JsonDeserializer;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonParseException;
import me.chanjar.weixin.common.util.json.GsonHelper;
import me.chanjar.weixin.mp.bean.datacube.WxDataCubeUserSummary;
/**
* @author Daniel Qian
*/
public class WxMpUserSummaryGsonAdapter implements JsonDeserializer<WxDataCubeUserSummary> {
private static final SimpleDateFormat SIMPLE_DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd");
private static final FastDateFormat SIMPLE_DATE_FORMAT = FastDateFormat
.getInstance("yyyy-MM-dd");
@Override
public WxDataCubeUserSummary deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context)

View File

@ -1,10 +1,10 @@
package me.chanjar.weixin.mp.api.impl;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import org.apache.commons.lang3.time.FastDateFormat;
import org.testng.Assert;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Guice;
@ -28,39 +28,39 @@ import me.chanjar.weixin.mp.bean.datacube.WxDataCubeUserSummary;
*/
@Guice(modules = ApiTestModule.class)
public class WxMpDataCubeServiceImplTest {
private static SimpleDateFormat simpleDateFormat = new SimpleDateFormat(
"yyyy-MM-dd");
private FastDateFormat simpleDateFormat = FastDateFormat
.getInstance("yyyy-MM-dd");
@Inject
protected WxMpServiceImpl wxService;
@DataProvider
public Object[][] oneDay() throws ParseException {
return new Object[][] { { simpleDateFormat.parse("2016-08-22") } };
return new Object[][] { { this.simpleDateFormat.parse("2016-08-22") } };
}
@DataProvider
public Object[][] threeDays() throws ParseException {
return new Object[][] { { simpleDateFormat.parse("2016-08-20"),
simpleDateFormat.parse("2016-08-22") } };
return new Object[][] { { this.simpleDateFormat.parse("2016-08-20"),
this.simpleDateFormat.parse("2016-08-22") } };
}
@DataProvider
public Object[][] sevenDays() throws ParseException {
return new Object[][] { { simpleDateFormat.parse("2016-08-16"),
simpleDateFormat.parse("2016-08-22") } };
return new Object[][] { { this.simpleDateFormat.parse("2016-08-16"),
this.simpleDateFormat.parse("2016-08-22") } };
}
@DataProvider
public Object[][] fifteenDays() throws ParseException {
return new Object[][] { { simpleDateFormat.parse("2016-08-14"),
simpleDateFormat.parse("2016-08-27") } };
return new Object[][] { { this.simpleDateFormat.parse("2016-08-14"),
this.simpleDateFormat.parse("2016-08-27") } };
}
@DataProvider
public Object[][] thirtyDays() throws ParseException {
return new Object[][] { { simpleDateFormat.parse("2016-07-30"),
simpleDateFormat.parse("2016-08-27") } };
return new Object[][] { { this.simpleDateFormat.parse("2016-07-30"),
this.simpleDateFormat.parse("2016-08-27") } };
}
@Test(dataProvider = "sevenDays")