### Question:
QueueStatistics extends SerializableBase { public void incrementSuccessful(String date, long delta) { long val = tasksSuccessful.getOrDefault(date, 0L); tasksSuccessful.put(date, val + delta); } QueueStatistics(String id); void updateTime(); void incrementDeadLetter(String date, long delta); void update(TasksStat stat, String eventDate); void incrementDiscard(String date, long delta); void incrementSuccessful(String date, long delta); void updateJobExecutionTime(String date, JobRunTime jobRunTimeDelta); void pruneStats(LocalDate date, int maxDays); void incrementRetry(String date, long delta); long tasksDiscarded(String date); long tasksSuccessful(String date); long tasksMovedToDeadLetter(String date); long tasksRetried(String date); JobRunTime jobRunTime(String date);  }### Answer:
@Test public void incrementSuccessful() { QueueStatistics queueStatistics = new QueueStatistics(id); assertNotNull(queueStatistics.getTasksSuccessful()); queueStatistics.incrementSuccessful("2020-03-11", 10L); assertEquals(10L, queueStatistics.tasksSuccessful("2020-03-11")); queueStatistics.incrementSuccessful("2020-03-12", 100L); assertEquals(2, queueStatistics.getTasksSuccessful().size()); assertEquals(new Long(100), queueStatistics.getTasksSuccessful().get("2020-03-12")); queueStatistics.incrementSuccessful("2020-03-12", 100L); assertEquals(2, queueStatistics.getTasksSuccessful().size()); assertEquals(new Long(200), queueStatistics.getTasksSuccessful().get("2020-03-12")); }