private void testActionSuccessTypical(AccountAttributes student) {
    gaeSimulation.loginAsStudent(student.googleId);
    ______TS("Typical case");
    String[] submissionParams = new String[] {};
    StudentProfilePageAction action = getAction(submissionParams);
    ShowPageResult result = (ShowPageResult) action.executeAndPostProcess();

    AssertHelper.assertContains(
        "/jsp/studentProfilePage.jsp?error=false&user="******"", result.getStatusMessage());

    verifyAccountsAreSame(student, result);
    verifyLogMessage(student, action, false);
  }
  private void testActionInMasquerade(AccountAttributes student) {
    gaeSimulation.loginAsAdmin("admin.user");
    ______TS("Typical case: masquerade mode");
    String[] submissionParams =
        new String[] {
          Const.ParamsNames.STUDENT_PROFILE_PHOTOEDIT,
          "false",
          Const.ParamsNames.USER_ID,
          student.googleId
        };

    StudentProfilePageAction action =
        getAction(addUserIdToParams(student.googleId, submissionParams));
    ShowPageResult result = (ShowPageResult) action.executeAndPostProcess();

    AssertHelper.assertContains(
        Const.ViewURIs.STUDENT_PROFILE_PAGE + "?error=false&user="******"", result.getStatusMessage());

    verifyAccountsAreSame(student, result);
    verifyLogMessage(student, action, true);
  }
 private void verifyLogMessage(
     AccountAttributes student, StudentProfilePageAction action, boolean isMasquerade) {
   String expectedLogMessage =
       "TEAMMATESLOG|||studentProfilePage|||studentProfilePage"
           + "|||true|||Student"
           + (isMasquerade ? "(M)" : "")
           + "|||"
           + student.name
           + "|||"
           + student.googleId
           + "|||"
           + student.email
           + "|||studentProfile Page Load <br> Profile: "
           + student.studentProfile.toString()
           + "|||/page/studentProfilePage";
   AssertHelper.assertLogMessageEquals(expectedLogMessage, action.getLogMessage());
 }