Source:
<code>protected void testExecute_withCourseIdAndSectionName_shouldUpdatePrivilegesInSectionLevel() { InstructorAttributes instructor1OfCourse1 = typicalBundle.instructors.get("instructor1OfCourse1"); String[] submissionParams = new String[] { Const.ParamsNames.INSTRUCTOR_ID, instructor1OfCourse1.getGoogleId(), Const.ParamsNames.COURSE_ID, instructor1OfCourse1.courseId, }; InstructorPrivilegeUpdateRequest reqBody = new InstructorPrivilegeUpdateRequest(); reqBody.setCanViewStudentInSections(false); <START> reqBody.setCanSubmitSessionInSections(true); <END> reqBody.setSectionName("TUT1"); UpdateInstructorPrivilegeAction action = getAction(reqBody, submissionParams); JsonResult result = getJsonResult(action); assertEquals(HttpStatus.SC_OK, result.getStatusCode()); InstructorPrivilegeData response = (InstructorPrivilegeData) result.getOutput(); assertTrue(response.isCanModifyCourse()); assertTrue(response.isCanModifySession()); assertTrue(response.isCanModifyStudent()); assertTrue(response.isCanModifyInstructor()); assertFalse(response.isCanViewStudentInSections()); assertTrue(response.isCanSubmitSessionInSections()); assertFalse(response.isCanViewSessionInSections()); assertFalse(response.isCanModifySessionCommentsInSections()); }</code><technical_language>here. more section level privileges</technical_language>

Target:
protected void testExecute_withCourseIdAndSectionName_shouldUpdatePrivilegesInSectionLevel() { InstructorAttributes helper1OfCourse1 = typicalBundle.instructors.get("helperOfCourse1"); assertFalse(helper1OfCourse1.privileges.isAllowedForPrivilege( "TUT1", Const.ParamsNames.INSTRUCTOR_PERMISSION_VIEW_STUDENT_IN_SECTIONS)); assertFalse(helper1OfCourse1.privileges.isAllowedForPrivilege( "TUT1", Const.ParamsNames.INSTRUCTOR_PERMISSION_SUBMIT_SESSION_IN_SECTIONS)); assertFalse(helper1OfCourse1.privileges.isAllowedForPrivilege( "TUT1", Const.ParamsNames.INSTRUCTOR_PERMISSION_VIEW_SESSION_IN_SECTIONS)); assertFalse(helper1OfCourse1.privileges.isAllowedForPrivilege( "TUT1", Const.ParamsNames.INSTRUCTOR_PERMISSION_MODIFY_SESSION_COMMENT_IN_SECTIONS)); String[] submissionParams = new String[] { Const.ParamsNames.INSTRUCTOR_EMAIL, helper1OfCourse1.getEmail(), Const.ParamsNames.COURSE_ID, helper1OfCourse1.courseId, }; InstructorPrivilegeUpdateRequest reqBody = new InstructorPrivilegeUpdateRequest(); reqBody.setCanViewStudentInSections(true); reqBody.setCanSubmitSessionInSections(true); reqBody.setCanViewSessionInSections(true); reqBody.setCanModifySessionCommentsInSections(true); reqBody.setSectionName("TUT1"); UpdateInstructorPrivilegeAction action = getAction(reqBody, submissionParams); JsonResult result = getJsonResult(action); assertEquals(HttpStatus.SC_OK, result.getStatusCode()); InstructorPrivilegeData response = (InstructorPrivilegeData) result.getOutput(); assertFalse(response.isCanModifyCourse()); assertFalse(response.isCanModifySession()); assertFalse(response.isCanModifyStudent()); assertFalse(response.isCanModifyInstructor()); assertTrue(response.isCanViewStudentInSections()); assertTrue(response.isCanSubmitSessionInSections()); assertTrue(response.isCanViewSessionInSections()); assertTrue(response.isCanModifySessionCommentsInSections()); }