@@ -0,0 +1,1064 @@
+package co.nstant.in.cbor;%0A%0Aimport static org.junit.Assert.assertEquals;%0Aimport static org.junit.Assert.assertTrue;%0A%0Aimport java.io.ByteArrayInputStream;%0Aimport java.io.ByteArrayOutputStream;%0Aimport java.util.concurrent.atomic.AtomicInteger;%0A%0Aimport org.junit.Test;%0A%0Aimport co.nstant.in.cbor.model.DataItem;%0Aimport co.nstant.in.cbor.model.UnsignedInteger;%0A%0Apublic class DatemItemListenerTest %7B%0A%0A    @Test%0A    public void shouldDecodeZero() throws CborException %7B%0A        final AtomicInteger dataItems = new AtomicInteger(0);%0A        ByteArrayOutputStream outputStream = new ByteArrayOutputStream();%0A        new CborEncoder(outputStream).encode(new CborBuilder().add(1234).build());%0A        new CborDecoder(new ByteArrayInputStream(outputStream.toByteArray())).decode(new DataItemListener() %7B%0A%0A            @Override%0A            public void onDataItem(DataItem dataItem) %7B%0A                dataItems.incrementAndGet();%0A                assertTrue(dataItem instanceof UnsignedInteger);%0A            %7D%0A%0A        %7D);%0A        assertEquals(1, dataItems.intValue());%0A    %7D%0A%0A%7D%0A

Add test for DataItemListener