TaskDetailsPresenter extends AbstractTaskPresenter { public void setReadOnlyTaskDetail() { view.setTaskDescriptionEnabled(false); view.setDueDateEnabled(false); view.setTaskPriorityEnabled(false); view.setUpdateTaskVisible(false); } @Inject  TaskDetailsPresenter(TaskDetailsView view,
                                Caller<TaskService> taskService,
                                Event<TaskRefreshedEvent> taskRefreshed); @PostConstruct void init(); IsWidget getView(); void updateTask(final String taskDescription,
                           final Date dueDate,
                           final int priority); void setReadOnlyTaskDetail(); void onTaskSelectionEvent(@Observes final TaskSelectionEvent event); void onTaskRefreshedEvent(@Observes final TaskRefreshedEvent event); @Inject void setTranslationService(TranslationService translationService);  }
@Test public void disableTaskDetailEditionTest() { presenter.setReadOnlyTaskDetail(); verifyReadOnlyMode(1); }