<commit_before>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));
    }

}<commit_msg>Refactor mocked DOB to constants<commit_after>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 {

    public static final String BILL_DOB = "1970-01-08T12:30:49+05:30";
    public static final String PAUL_DOB = "1970-01-09T15:30:49+05:30";

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

        when(bill.getDateOfBirth()).thenReturn(DateTime.parse(BILL_DOB));
        when(paul.getDateOfBirth()).thenReturn(DateTime.parse(PAUL_DOB));

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

}
{'fraction_non_alphanumeric': 0.12413793103448276, 'fraction_numerical': 0.04252873563218391, 'mean_word_length': 4.5094936708860756, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2492410', 'n_tokens_mistral': 631, 'n_tokens_neox': 578, 'n_words': 96}