### Question:
CourseAddEditPresenter { public void setUpMode() { Integer selectedCourseId = view.getSelectedCourseId(); if (selectedCourseId == -1) { view.setUpAddMode(); } else { Course course = courseDAO.find(selectedCourseId); view.setUpEditMode(course); } } CourseAddEditPresenter(CourseAddEditView view, CourseDAO courseDAO); void setUpMode(); void onClickSaveCourse(); void onClickDeleteCourse();  }### Answer:
@Test public void shouldCallSetUpAddMode() { when(courseAddEditView.getSelectedCourseId()).thenReturn(-1); presenterUnderTest.setUpMode(); verify(courseAddEditView).setUpAddMode(); }
@Test public void shouldCallSetUpEditMode() { Course course = new Course("test", "test", 1, 1); course.setId(1); when(courseDAO.find(1)).thenReturn(course); when(courseAddEditView.getSelectedCourseId()).thenReturn(1); presenterUnderTest.setUpMode(); verify(courseAddEditView).setUpEditMode(course); }