TasksViewModel extends BaseViewModel<TasksViewModel.State> { protected void onTaskItemClick(Task task) { setState(State.CLICK_TASK, Constants.Key.ID, task.getId()); } TasksViewModel(); @Override void onCreate(); List<Task> getTasks(); void reloadData();  }
@Test public void testOnTaskItemClick() throws Exception { Task task = new Task("title", "description"); mTasksViewModel.onTaskItemClick(task); verify(mTasksViewModel, times(1)).setState(eq(TasksViewModel.State.CLICK_TASK), eq(Constants.Key.ID), eq(task.getId())); }