### Question:
AnalysisController { @RequestMapping(value="/analysis/addNewPhrase", method=RequestMethod.POST) public String addNewSeriesSearchCriteria(@ModelAttribute("analysisForm") AnalysisForm analysisForm, ModelMap model, HttpServletRequest request) { analysisForm.addSeriesFilter(new JudgmentSeriesFilter()); courtDataModelCreator.addCourtDataToModel(analysisForm.getGlobalFilter().getCourtCriteria(), model); return "analysisForm"; }  @ModelAttribute("analysisForm") AnalysisForm analysisForm(); @ModelAttribute("maxNumberOfSearchPhrases") int maxNumberOfSearchPhrases(); @InitBinder void initBinder(WebDataBinder dataBinder); @RequestMapping(value="/analysis", method=RequestMethod.GET) String showAnalysis(@ModelAttribute("analysisForm") AnalysisForm analysisForm, ModelMap model, HttpServletRequest request); @RequestMapping(value="/analysis/removePhrase", method=RequestMethod.POST) String removeSeriesSearchCriteria(@ModelAttribute("analysisForm") AnalysisForm analysisForm, @RequestParam("filterIndexToRemove") int filterIndexToRemove, ModelMap model, HttpServletRequest request); @RequestMapping(value="/analysis/addNewPhrase", method=RequestMethod.POST) String addNewSeriesSearchCriteria(@ModelAttribute("analysisForm") AnalysisForm analysisForm, ModelMap model, HttpServletRequest request); @RequestMapping(value="/analysis/generate", method= RequestMethod.GET) @ResponseBody AnalysisResult generate(@ModelAttribute("analysisForm") AnalysisForm analysisForm); @RequestMapping(value="/analysis/generateCsv", method= RequestMethod.GET) void generateCsv(@ModelAttribute("analysisForm") AnalysisForm analysisForm, @RequestParam("chartCode") ChartCode chartCode, Locale locale, HttpServletResponse response); @Autowired void setFlotChartService(FlotChartService flotChartService); @Autowired void setChartCsvService(ChartCsvService chartCsvService); @Autowired void setJudgmentDateRangeFactory(DefaultJudgmentGlobalFilterFactory judgmentDateRangeFactory); @Autowired void setCourtDataModelCreator(CourtDataModelCreator courtDataModelCreator); @Value("${analysis.maxNumberOfSearchPhrases}") void setMaxNumberOfSearchPhrases(int maxNumberOfSearchPhrases);  }### Answer:
@Test public void addNewSeriesSearchCriteria() throws Exception { ResultActions result = mockMvc.perform(post(URL_BASE + "/addNewPhrase") .param("seriesFilters[0].phrase", "phrase1") .param("seriesFilters[1].phrase", "phrase2")); result .andExpect(status().isOk()) .andExpect(view().name("analysisForm")) .andExpect(model().attribute("analysisForm", hasProperty("seriesFilters", contains( createJudgmentSeriesFilter("phrase1"), createJudgmentSeriesFilter("phrase2"), createJudgmentSeriesFilter(null)) ) )); }