@@ -0,0 +1,1431 @@
+package dk.statsbiblioteket.newspaper.metadatachecker;%0A%0Aimport dk.statsbiblioteket.medieplatform.autonomous.ResultCollector;%0Aimport dk.statsbiblioteket.medieplatform.autonomous.iterator.common.AttributeParsingEvent;%0Aimport dk.statsbiblioteket.newspaper.metadatachecker.mockers.AttributeParsingEventMocker;%0Aimport org.testng.annotations.Test;%0Aimport static org.testng.AssertJUnit.assertFalse;%0Aimport static org.testng.AssertJUnit.assertTrue;%0A%0Apublic class ChecksumCheckEventHandlerTest %7B%0A    @Test%0A    public void goodTest() %7B%0A        ResultCollector resultCollector = new ResultCollector(%22elf%22, %22orc%22);%0A%0A        AttributeParsingEvent attributeEvent = new AttributeParsingEventMocker();%0A%0A        ChecksumCheckEventHandler handler = new ChecksumCheckEventHandler(resultCollector);%0A        handler.handleAttribute(attributeEvent);%0A%0A        assertTrue(resultCollector.isSuccess());%0A    %7D%0A%0A    @Test%0A    public void badTest() %7B%0A        ResultCollector resultCollector = new ResultCollector(%22imp%22, %22bat%22);%0A%0A        // Make event with bad checksum%0A        AttributeParsingEvent attributeEvent = new AttributeParsingEventMocker(%228a6503%22);%0A%0A        ChecksumCheckEventHandler handler = new ChecksumCheckEventHandler(resultCollector);%0A        handler.handleAttribute(attributeEvent);%0A%0A        assertFalse(resultCollector.isSuccess());%0A        String report = resultCollector.toReport();%0A        assertTrue(report.contains(%222F-O1:%22));%0A    %7D%0A%7D%0A

Test for ChecksumCheck