  @Test
  public void testOnTaskUpdate() throws Exception {

    Task taskA = new Task("title a", "description a");
    List<Task> tasks = mTasksViewModel.getTasks();
    tasks.add(taskA);
    Task taskB = new Task(taskA.getId(), "title b", "description b");

    mTasksViewModel.onTaskUpdate(taskB);

    verify(mTasksViewModel, times(1)).setState(eq(TasksViewModel.State.UPDATED_TASK), eq(Constants.Key.INDEX), eq(tasks.size() - 1));
  }