@@ -0,0 +1,1860 @@
+package de.otto.jlineup.report;%0A%0Aimport de.otto.jlineup.file.FileService;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0Aimport org.mockito.Mock;%0Aimport org.mockito.Mockito;%0A%0Aimport static java.util.Collections.singletonList;%0Aimport static org.mockito.MockitoAnnotations.initMocks;%0A%0Apublic class JSONReportWriterV2Test %7B%0A%0A    private JSONReportWriter_V2 testee;%0A%0A    @Mock%0A    private FileService fileServiceMock;%0A%0A    @Before%0A    public void setup() %7B%0A        initMocks(this);%0A        testee = new JSONReportWriter_V2(fileServiceMock);%0A    %7D%0A%0A    @Test%0A    public void shouldWriteComparisonReportAsJson() throws Exception %7B%0A%0A        ScreenshotComparisonResult screenshotComparisonResult =%0A                new ScreenshotComparisonResult(%22url%22, 1337, 1338, 0d, %22before%22, %22after%22, %22differenceSum%22);%0A        Report report = new Report(new Summary(false, 0d, 0d), singletonList(screenshotComparisonResult));%0A%0A        String expectedString = %22%7B%5Cn%22 +%0A                %22  %5C%22summary%5C%22: %7B%5Cn%22 +%0A                %22    %5C%22error%5C%22: false,%5Cn%22 +%0A                %22    %5C%22differenceSum%5C%22: 0.0,%5Cn%22 +%0A                %22    %5C%22differenceMax%5C%22: 0.0%5Cn%22 +%0A                %22  %7D,%5Cn%22 +%0A                %22  %5C%22screenshotComparisons%5C%22: %5B%5Cn%22 +%0A                %22    %7B%5Cn%22 +%0A                %22      %5C%22url%5C%22: %5C%22url%5C%22,%5Cn%22 +%0A                %22      %5C%22width%5C%22: 1337,%5Cn%22 +%0A                %22      %5C%22verticalScrollPosition%5C%22: 1338,%5Cn%22 +%0A                %22      %5C%22difference%5C%22: 0.0,%5Cn%22 +%0A                %22      %5C%22screenshotBeforeFileName%5C%22: %5C%22before%5C%22,%5Cn%22 +%0A                %22      %5C%22screenshotAfterFileName%5C%22: %5C%22after%5C%22,%5Cn%22 +%0A                %22      %5C%22differenceImageFileName%5C%22: %5C%22differenceSum%5C%22%5Cn%22 +%0A                %22    %7D%5Cn%22 +%0A                %22  %5D%5Cn%22 +%0A                %22%7D%22;%0A%0A        testee.writeComparisonReportAsJson(report);%0A%0A        Mockito.verify(fileServiceMock).writeJsonReport(expectedString);%0A    %7D%0A%7D

Test for report format v2