@Test
public void testGetTitleForStep() throws Exception {

    Task task = new TaskImpl("id");
    Context mockContext = Mockito.mock(Context.class);
    Mockito.when(mockContext.getString(R.string.app_name)).thenReturn("title");
    Mockito.when(mockContext.getString(0)).thenReturn("title");
    Step mockStepWithTitle = Mockito.mock(Step.class);
    Mockito.when(mockStepWithTitle.getStepTitle()).thenReturn(R.string.app_name);
    String title = task.getTitleForStep(mockContext, mockStepWithTitle);
    assertEquals("Gets title from context using step id", "title", title);
    Step mockStepWithoutTitle = Mockito.mock(Step.class);
    Mockito.when(mockStepWithoutTitle.getStepTitle()).thenReturn(0);
    String noTitle = task.getTitleForStep(mockContext, mockStepWithoutTitle);
    assertEquals("Gets empty string when no title id on step", "", noTitle);
}