Source:
<code>public void testMasqueradeMode() { String adminUserId = "admin.user"; gaeSimulation.loginAsAdmin(adminUserId); InstructorAttributes instructor1ofCourse1 = typicalBundle.instructors.get("instructor1OfCourse1"); FeedbackSessionAttributes fs = typicalBundle.feedbackSessions.get("session1InCourse1"); String[] params = new String[] { Const.ParamsNames.COURSE_ID, fs.getCourseId(), Const.ParamsNames.FEEDBACK_SESSION_NAME, fs.getFeedbackSessionName(), Const.ParamsNames.FEEDBACK_QUESTION_TEMPLATE_NUMBER, "2" }; params = addUserIdToParams(instructor1ofCourse1.googleId, params); InstructorFeedbackTemplateQuestionAddAction action = getAction(params); RedirectResult result = getRedirectResult(action); assertEquals( getPageResultDestination( Const.ActionURIs.INSTRUCTOR_FEEDBACK_EDIT_PAGE, instructor1ofCourse1.courseId, "First+feedback+session", instructor1ofCourse1.googleId, false), result.getDestinationWithParams()); String expectedLogMessage = "TEAMMATESLOG|||instructorFeedbackTemplateQuestionAdd|||" + "instructorFeedbackTemplateQuestionAdd|||true|||" + "Instructor(M)|||Instructor 1 of Course 1|||" + "idOfInstructor1OfCourse1|||instr1@course1.tmt|||" + "Added Feedback Template Question for Feedback Session:<span class=\"bold\">" + "(First feedback session)</span> for Course " + "<span class=\"bold\">[idOfTypicalCourse1]</span>" + " created.<br><span class=\"bold\">Essay question:</span> " + "Comments about your contribution (shown to other teammates)|||" + "/page/instructorFeedbackTemplateQuestionAdd"; <START> AssertHelper.assertLogMessageEqualsInMasqueradeMode(expectedLogMessage, action.getLogMessage(), adminUserId); <END> }</code><technical_language>Verify question is added</technical_language>

Target:
public void testMasqueradeMode() { String adminUserId = "admin.user"; gaeSimulation.loginAsAdmin(adminUserId); InstructorAttributes instructor1ofCourse1 = typicalBundle.instructors.get("instructor1OfCourse1"); FeedbackSessionAttributes fs = typicalBundle.feedbackSessions.get("session1InCourse1"); String[] params = new String[] { Const.ParamsNames.COURSE_ID, fs.getCourseId(), Const.ParamsNames.FEEDBACK_SESSION_NAME, fs.getFeedbackSessionName(), Const.ParamsNames.FEEDBACK_QUESTION_TEMPLATE_NUMBER, "2" }; params = addUserIdToParams(instructor1ofCourse1.googleId, params); InstructorFeedbackTemplateQuestionAddAction action = getAction(params); RedirectResult result = getRedirectResult(action); assertEquals( getPageResultDestination( Const.ActionURIs.INSTRUCTOR_FEEDBACK_EDIT_PAGE, instructor1ofCourse1.courseId, "First+feedback+session", instructor1ofCourse1.googleId, false), result.getDestinationWithParams()); String expectedLogMessage = "TEAMMATESLOG|||instructorFeedbackTemplateQuestionAdd|||" + "instructorFeedbackTemplateQuestionAdd|||true|||" + "Instructor(M)|||Instructor 1 of Course 1|||" + "idOfInstructor1OfCourse1|||instr1@course1.tmt|||" + "Added Feedback Template Question for Feedback Session:<span class=\"bold\">" + "(First feedback session)</span> for Course " + "<span class=\"bold\">[idOfTypicalCourse1]</span>" + " created.<br><span class=\"bold\">Essay question:</span> " + "Comments about your contribution (shown to other teammates)|||" + "/page/instructorFeedbackTemplateQuestionAdd"; AssertHelper.assertLogMessageEqualsInMasqueradeMode(expectedLogMessage, action.getLogMessage(), adminUserId); FeedbackQuestionAttributes fqa = FeedbackQuestionsLogic.inst().getFeedbackQuestion(fs.getFeedbackSessionName(), fs.getCourseId(), 6); assertNotNull(fqa); }