UploadDataAction extends ActionSupport implements PrincipalAware { @Override @SkipValidation public String execute() { PatientAccount account = patientDao.getByUsername(getUserPrincipal().getName()); List<PatientData> data = patientDataService.getPatientData(account.getGuid()); setRetrievedPatientData(data); surveyTaken = account.isSurveyTaken(); 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 execute() { assertEquals(Action.SUCCESS, action.execute()); assertNotNull(action.getRetrievedPatientData()); assertFalse(action.isSurveyTaken()); }