@Override
    protected void updateData(SummaryInfo info, Sample sample) {
        // Initialize overall data if they don't exist
        SummaryInfo overallInfo = getOverallInfo();
        Long overallData = overallInfo.getData();
        if (overallData == null) {
            overallData = ZERO;
        }
        overallInfo.setData(overallData + 1);

        // Process only failed samples
        if (!sample.getSuccess()) {
            errorCount++;

            Long data = info.getData();
            if (data == null) {
                data = ZERO;
            }
            info.setData(data + 1);
        }
    }
@Test
    public void testErrorSampleCounter() {
        ErrorsSummaryConsumer consumer = new ErrorsSummaryConsumer();
        Sample sample = createSample(false);
        AbstractSummaryConsumer<Long>.SummaryInfo info = consumer.new SummaryInfo(false);
        assertNull(info.getData());
        consumer.updateData(info, sample);
        assertEquals(Long.valueOf(1), info.getData());
        consumer.updateData(info, sample);
        assertEquals(Long.valueOf(2), info.getData());
    }