@@ -0,0 +1,2503 @@
+package com.searchmetrics.simpleEmailService.dto;%0A%0Aimport com.amazonaws.services.simpleemail.model.GetSendStatisticsResult;%0Aimport com.amazonaws.services.simpleemail.model.SendDataPoint;%0Aimport org.junit.Assert;%0Aimport org.junit.Test;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.Date;%0Aimport java.util.List;%0A%0Apublic class SendStatisticsTest %7B%0A    @Test%0A    public void constructFromSendStatisticsResult() throws Exception %7B%0A        List%3CSendDataPoint%3E sendDataPointCollection = new ArrayList%3C%3E();%0A%0A        SendDataPoint sendDataPointA = new SendDataPoint();%0A        sendDataPointA.setTimestamp(new Date(System.currentTimeMillis()));%0A        sendDataPointA.setDeliveryAttempts((long) 5);%0A        sendDataPointA.setBounces((long) 0);%0A        sendDataPointA.setComplaints((long) 0);%0A        sendDataPointA.setRejects((long) 0);%0A%0A        SendDataPoint sendDataPointB = new SendDataPoint();%0A        sendDataPointB.setTimestamp(new Date(System.currentTimeMillis() - 10000));%0A        sendDataPointB.setBounces((long) 3);%0A        sendDataPointB.setComplaints((long) 2);%0A        sendDataPointB.setDeliveryAttempts((long) 500);%0A        sendDataPointB.setRejects((long) 2);%0A%0A        sendDataPointCollection.add(sendDataPointA);%0A        sendDataPointCollection.add(sendDataPointB);%0A%0A        GetSendStatisticsResult sendStatisticsResult = new GetSendStatisticsResult();%0A        sendStatisticsResult.setSendDataPoints(sendDataPointCollection);%0A%0A        // convert it to SendStatistics%0A        SendStatistics sendStatistics = new SendStatistics(sendStatisticsResult);%0A        List%3CSendStatistics.DataPoint%3E dataPointList = sendStatistics.getDataPointList();%0A%0A        Assert.assertEquals(2, dataPointList.size());%0A%0A        SendStatistics.DataPoint dataPointA = dataPointList.get(0);%0A        SendStatistics.DataPoint dataPointB = dataPointList.get(1);%0A%0A        Assert.assertEquals(sendDataPointA.getTimestamp(), dataPointA.getTimestamp());%0A        Assert.assertEquals(0, dataPointA.getBounces());%0A        Assert.assertEquals(0, dataPointA.getComplaints());%0A        Assert.assertEquals(5, dataPointA.getDeliveryAttempts());%0A        Assert.assertEquals(0, dataPointA.getRejects());%0A%0A        Assert.assertEquals(sendDataPointB.getTimestamp(), dataPointB.getTimestamp());%0A        Assert.assertEquals(3, dataPointB.getBounces());%0A        Assert.assertEquals(2, dataPointB.getComplaints());%0A        Assert.assertEquals(500, dataPointB.getDeliveryAttempts());%0A        Assert.assertEquals(2, dataPointB.getRejects());%0A    %7D%0A%7D%0A

Add SendStatisticsTest