ConfigController { @RequestMapping("/config.js") public String config() throws JsonProcessingException { return "angular.module('crowdsource')" + ".value('emailBlacklistPatterns', " + objectMapper.writeValueAsString(emailBlacklistPatterns) + ")"; } @Autowired  ConfigController(
            @Value("#{'${de.asideas.crowdsource.content.email.blacklist.patterns}'.split(',')}") List<String> emailBlacklistPatterns); @RequestMapping("/config.js") String config();  }
@Test public void testConfig() throws Exception { final MvcResult mvcResult = mockMvc.perform(get("/config.js")) .andExpect(status().isOk()) .andReturn(); assertThat(mvcResult.getResponse().getContentAsString(), is("angular.module('crowdsource').value('emailBlacklistPatterns', [\"_extern\",\"foo\"])")); }