UploadDataAction extends ActionSupport implements PrincipalAware { @SkipValidation public String markSurveyTaken() { PatientAccount account = patientDao.getByUsername(getUserPrincipal().getName()); account.setSurveyTaken(true); patientDao.save(account); setSurveyTaken(true); return SUCCESS; } @Inject  UploadDataAction(PatientDataService patientDataService, PatientAccountDao accountDao); @Override @SkipValidation String execute(); String upload(); @SkipValidation String markSurveyTaken(); List<PatientData> getRetrievedPatientData(); void setRetrievedPatientData(List<PatientData> retrievedPatientData); File getDataFile(); void setDataFile(File dataFile); String getDataFileFileName(); void setDataFileFileName(String dataFileFileName); PatientData getPatientData(); void setPatientData(PatientData patientData); String getTags(); void setTags(String tags); PrincipalProxy getPrincipalProxy(); @Override void setPrincipalProxy(PrincipalProxy principalProxy); boolean isSurveyTaken(); void setSurveyTaken(boolean surveyTaken);  }
@Test public void markSurveyTaken() { assertEquals(Action.SUCCESS, action.markSurveyTaken()); assertTrue(action.isSurveyTaken()); }