@@ -0,0 +1,1852 @@
+package org.easybatch.core.reader;%0A%0Aimport org.easybatch.core.api.Record;%0Aimport org.easybatch.core.record.PoisonRecord;%0Aimport org.junit.After;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0Aimport org.mockito.Mock;%0Aimport org.mockito.runners.MockitoJUnitRunner;%0A%0Aimport java.util.concurrent.ArrayBlockingQueue;%0Aimport java.util.concurrent.BlockingQueue;%0A%0Aimport static org.assertj.core.api.Assertions.assertThat;%0A%0A/**%0A * Test class for %7B@link QueueRecordReader%7D.%0A *%0A * @author Mahmoud Ben Hassine (mahmoud@benhassine.fr)%0A */%0A@RunWith(MockitoJUnitRunner.class)%0Apublic class QueueRecordReaderTest %7B%0A%0A    private QueueRecordReader queueRecordReader;%0A%0A    private BlockingQueue%3CRecord%3E queue;%0A%0A    @Mock%0A    private Record record;%0A%0A    @Mock%0A    private PoisonRecord poisonRecord;%0A%0A    @Before%0A    public void setUp() throws Exception %7B%0A        queue = new ArrayBlockingQueue%3CRecord%3E(10);%0A        queue.put(record);%0A        queue.put(poisonRecord);%0A%0A        queueRecordReader = new QueueRecordReader(queue);%0A        queueRecordReader.open();%0A    %7D%0A%0A    @Test%0A    public void testTotalRecordsIsNull() throws Exception %7B%0A        assertThat(queueRecordReader.getTotalRecords()).isNull();%0A    %7D%0A%0A    @Test%0A    public void testHasNextRecord() throws Exception %7B%0A        assertThat(queueRecordReader.hasNextRecord()).isTrue();%0A    %7D%0A%0A    @Test%0A    public void testReadNextRecord() throws Exception %7B%0A        assertThat(queueRecordReader.readNextRecord()).isEqualTo(record);%0A        assertThat(queueRecordReader.hasNextRecord()).isTrue();%0A        assertThat(queueRecordReader.readNextRecord()).isEqualTo(poisonRecord);%0A        assertThat(queueRecordReader.hasNextRecord()).isFalse();%0A        assertThat(queue).isEmpty();%0A    %7D%0A%0A    @After%0A    public void tearDown() throws Exception %7B%0A        queueRecordReader.close();%0A    %7D%0A%7D

add tests for QueueRecordReader