package com.alexstyl.specialdates.events;

import com.alexstyl.specialdates.date.DateDisplayStringCreator;
import com.alexstyl.specialdates.date.Date;

import org.junit.BeforeClass;
import org.junit.Test;

import static org.fest.assertions.api.Assertions.assertThat;

public class DateDisplayStringCreatorTest {
    private static final String EXPECTED_STRING = "1995-05-05";
    private static final String EXPECTED_STRING_NO_YEAR = "--05-05";

    private static DateDisplayStringCreator creator;

    @BeforeClass
    public static void init() {
        creator = DateDisplayStringCreator.INSTANCE;
    }

    @Test
    public void givenDateWithYear_thenReturningStringIsCorrect() {
        Date date = Date.on(5, 5, 1995);
        String dateToString = creator.stringOf(date);
        assertThat(dateToString).isEqualTo(EXPECTED_STRING);
    }

    @Test
    public void givenDateWithNoYear_thenReturningStringIsCorrect() {
        Date date = Date.on(5, 5);
        String dateToString = creator.stringOf(date);
        assertThat(dateToString).isEqualTo(EXPECTED_STRING_NO_YEAR);
    }

}

@@ -199,16 +199,80 @@
 .Test;%0A%0A
+import static com.alexstyl.specialdates.date.DateConstants.MAY;%0A
 import s
@@ -372,141 +372,8 @@
 st %7B
-%0A    private static final String EXPECTED_STRING = %221995-05-05%22;%0A    private static final String EXPECTED_STRING_NO_YEAR = %22--05-05%22;
 %0A%0A  
@@ -641,17 +641,19 @@
 e.on(5, 
-5
+MAY
 , 1995);
@@ -750,31 +750,28 @@
 EqualTo(
-EXPECTED_STRING
+%221995-05-05%22
 );%0A    %7D
@@ -882,17 +882,19 @@
 e.on(5, 
-5
+MAY
 );%0A     
@@ -989,31 +989,17 @@
 lTo(
-EXPECTED_STRING_NO_YEAR
+%22--05-05%22
 );%0A 

Replace magic numbers with constants