package com.springapp.batch;

import com.springapp.batch.bo.BookEntry;
import org.joda.time.DateTime;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.runners.MockitoJUnitRunner;

import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;

@RunWith(MockitoJUnitRunner.class)
public class CompareEntryTest {

    @Test
    public void testJob() throws Exception {
        BookEntry bill = mock(BookEntry.class);
        BookEntry paul = mock(BookEntry.class);

        when(bill.getDateOfBirth()).thenReturn(DateTime.parse("1970-01-08T12:30:49+05:30"));
        when(paul.getDateOfBirth()).thenReturn(DateTime.parse("1970-01-09T15:30:49+05:30"));

        Assert.assertEquals(1, bill.compareTo(paul));
    }

}

@@ -373,16 +373,159 @@
 Test %7B%0A%0A
+    public static final String BILL_DOB = %221970-01-08T12:30:49+05:30%22;%0A    public static final String PAUL_DOB = %221970-01-09T15:30:49+05:30%22;%0A%0A
     @Tes
@@ -734,35 +734,16 @@
 rse(
-%221970-01-08T12:30:49+05:30%22
+BILL_DOB
 ));%0A
@@ -808,35 +808,16 @@
 rse(
-%221970-01-09T15:30:49+05:30%22
+PAUL_DOB
 ));%0A

Refactor mocked DOB to constants