analysis.setText("{foo:\"ab\",boo:12}");
AnalysisDAO mockedAnalysisDAO = mock(AnalysisDAO.class);
AnalysisAction analysisAction = new AnalysisAction();
analysisAction.setAnalysisDAO(mockedAnalysisDAO);
when(mockedAnalysisDAO.save(analysis)).thenReturn(1212l);
String successString = analysisAction.saveAnalysis();
assertEquals(analysisAction.getAnalysisDAO().save(analysis), 1212l);
assertEquals(successString, "success");