@Test
public void saveTask_savesTaskToServiceAPI() {

    // Given a stub task with title and description
    Task newTask = new Task(TASK_TITLE, "Some Task Description");
    // When a task is saved to the tasks repository
    mTasksRepository.saveTask(newTask);
    // Then the service API and persistent repository are called and the cache is updated
    Mockito.verify(mTasksRemoteDataSource).saveTask(newTask);
    Mockito.verify(mTasksLocalDataSource).saveTask(newTask);
    assertThat(mTasksRepository.mCachedTasks.size(), CoreMatchers.is(1));
}