<commit_before>package com.alexstyl.specialdates.date;

import android.content.res.Resources;

import com.alexstyl.specialdates.DisplayName;
import com.alexstyl.specialdates.Optional;
import com.alexstyl.specialdates.R;
import com.alexstyl.specialdates.TestContact;
import com.alexstyl.specialdates.contact.Contact;
import com.alexstyl.specialdates.events.peopleevents.StandardEventType;

import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.runners.MockitoJUnitRunner;

import static com.alexstyl.specialdates.date.DateConstants.JANUARY;
import static org.fest.assertions.api.Assertions.assertThat;
import static org.mockito.Mockito.when;

@RunWith(MockitoJUnitRunner.class)
public class ContactEventTest {

    private static final Optional<Long> NO_DEVICE_ID = Optional.absent();
    private static final Contact ANY_CONTACT = new TestContact(1, DisplayName.from("Peter"));
    private static final Date SOME_DATE = Date.on(1, JANUARY, 1990);
    private static final Date SOME_DATE_WITHOUT_YEAR = Date.on(1, JANUARY);
    private static final int CURRENT_YEAR = Date.CURRENT_YEAR;

    @Mock
    private Resources mockResources;

    @Before
    public void setUp() throws Exception {
        when(mockResources.getString(R.string.nameday)).thenReturn("Nameday");
        when(mockResources.getString(R.string.birthday)).thenReturn("Birthday");
        when(mockResources.getString(R.string.turns_age, 10)).thenReturn("Turns 10");

    }
<commit_msg>Fix failing test<commit_after>package com.alexstyl.specialdates.date;

import com.alexstyl.StringResources;
import com.alexstyl.specialdates.DisplayName;
import com.alexstyl.specialdates.Optional;
import com.alexstyl.specialdates.R;
import com.alexstyl.specialdates.TestContact;
import com.alexstyl.specialdates.contact.Contact;
import com.alexstyl.specialdates.events.peopleevents.StandardEventType;

import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.runners.MockitoJUnitRunner;

import static com.alexstyl.specialdates.date.DateConstants.JANUARY;
import static org.fest.assertions.api.Assertions.assertThat;
import static org.mockito.Mockito.when;

@RunWith(MockitoJUnitRunner.class)
public class ContactEventTest {

    private static final Optional<Long> NO_DEVICE_ID = Optional.absent();
    private static final Contact ANY_CONTACT = new TestContact(1, DisplayName.from("Peter"));
    private static final Date SOME_DATE = Date.on(1, JANUARY, 1990);
    private static final Date SOME_DATE_WITHOUT_YEAR = Date.on(1, JANUARY);
    private static final int CURRENT_YEAR = Date.CURRENT_YEAR;

    @Mock
    private StringResources mockResources;

    @Before
    public void setUp() throws Exception {
        when(mockResources.getString(R.string.nameday)).thenReturn("Nameday");
        when(mockResources.getString(R.string.birthday)).thenReturn("Birthday");
        when(mockResources.getString(R.string.turns_age, 10)).thenReturn("Turns 10");

    }

{'fraction_non_alphanumeric': 0.10166721150702844, 'fraction_numerical': 0.007191892775416803, 'mean_word_length': 5.361746361746362, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '7061382', 'n_tokens_mistral': 987, 'n_tokens_neox': 931, 'n_words': 180}