@Test
public void testGetHeaderText() throws Exception {

    LocalDate date = LocalDate.now();
    RangeUnit unit = mock(RangeUnit.class);
    when(unit.getType()).thenReturn(CalendarUnit.TYPE_WEEK);
    when(unit.getFrom()).thenReturn(date);
    when(unit.getTo()).thenReturn(date);
    when(formatter.getHeaderText(eq(CalendarUnit.TYPE_WEEK), eq(date), eq(date))).thenReturn("header");
    mCalendarManager.setUnit(unit);
    String header = mCalendarManager.getHeaderText();
    assertEquals("header", header);
}