@Test public void testPopulateTable() { PopulateController controller = new PopulateController(); ParkService mockParkService = new MockParkService(); ReflectionTestUtils.setField(controller, "parkService", mockParkService); Model model = new BindingAwareModelMap(); Assert.assertEquals(controller.populateTable(model), "populateTable"); Assert.assertNotNull(model.asMap().get("population")); }
@RequestMapping(value = "populateTable") public String populateTable(Model model) { model.addAttribute("population", parkService.getSavedTokens()); return "populateTable"; }
PopulateController { @RequestMapping(value = "populateTable") public String populateTable(Model model) { model.addAttribute("population", parkService.getSavedTokens()); return "populateTable"; } }
PopulateController { @RequestMapping(value = "populateTable") public String populateTable(Model model) { model.addAttribute("population", parkService.getSavedTokens()); return "populateTable"; }  }
PopulateController { @RequestMapping(value = "populateTable") public String populateTable(Model model) { model.addAttribute("population", parkService.getSavedTokens()); return "populateTable"; }  @RequestMapping(value = "devices/populateAndStore/{token}") @ResponseBody int populate(@PathVariable String token,
            @RequestParam(required = false, defaultValue = "false", value = "isToOverride") Boolean isToOverrideMetaData); @RequestMapping(value = "populate") String populate(Model model); @RequestMapping(value = "populateTable") String populateTable(Model model); @Scheduled(fixedRate=1*12*60*60*1000) void populate(); @RequestMapping(value = "repopulate") String repopulate(Model model); }
PopulateController { @RequestMapping(value = "populateTable") public String populateTable(Model model) { model.addAttribute("population", parkService.getSavedTokens()); return "populateTable"; }  @RequestMapping(value = "devices/populateAndStore/{token}") @ResponseBody int populate(@PathVariable String token,
            @RequestParam(required = false, defaultValue = "false", value = "isToOverride") Boolean isToOverrideMetaData); @RequestMapping(value = "populate") String populate(Model model); @RequestMapping(value = "populateTable") String populateTable(Model model); @Scheduled(fixedRate=1*12*60*60*1000) void populate(); @RequestMapping(value = "repopulate") String repopulate(Model model);  }