@Test public void testGetPolicyCombiningAlgIds() throws Exception { final String key1 = "key1"; final String key2 = "key2"; final String value1 = "value1"; final String value2 = "value2"; final String uri = API + "/policyCombiningAlgIds"; @SuppressWarnings("serial") final Map<String, String> map = new HashMap<String, String>() { { put(key1, value1); put(key2, value2); } }; when(policyService.getPolicyCombiningAlgIds()).thenReturn(map); mockMvc.perform(get(uri).contentType(APPLICATION_JSON_UTF8)) .andExpect(status().isOk()) .andExpect(content().contentType(APPLICATION_JSON_UTF8)) .andExpect(jsonPath("$." + key1, is(value1))) .andExpect(jsonPath("$." + key2, is(value2))); verify(policyService, times(1)).getPolicyCombiningAlgIds(); }
@RequestMapping(value = "/policyCombiningAlgIds", method = RequestMethod.GET) public Map<String, String> getPolicyCombiningAlgIds() { return policyService.getPolicyCombiningAlgIds(); }
PolicyControllerV1 extends AbstractPolRepRestApiControllerV1 { @RequestMapping(value = "/policyCombiningAlgIds", method = RequestMethod.GET) public Map<String, String> getPolicyCombiningAlgIds() { return policyService.getPolicyCombiningAlgIds(); } }
PolicyControllerV1 extends AbstractPolRepRestApiControllerV1 { @RequestMapping(value = "/policyCombiningAlgIds", method = RequestMethod.GET) public Map<String, String> getPolicyCombiningAlgIds() { return policyService.getPolicyCombiningAlgIds(); }  }
PolicyControllerV1 extends AbstractPolRepRestApiControllerV1 { @RequestMapping(value = "/policyCombiningAlgIds", method = RequestMethod.GET) public Map<String, String> getPolicyCombiningAlgIds() { return policyService.getPolicyCombiningAlgIds(); }  @RequestMapping(value = "/policies", method = RequestMethod.POST) PolicyMetadataContainerDto addPolicies(
			@Valid @RequestBody PolicyContentContainerDto addPolicyRequestContainerDto,
			@RequestParam(value = "force", required = false) boolean force); @RequestMapping(value = "/policies/{policyId}", method = RequestMethod.DELETE) void deletePolicy(@PathVariable(value = "policyId") String policyId,
			HttpServletResponse response); @RequestMapping(value = "/policies", method = RequestMethod.GET) PolicyMetadataContainerDto getAllPolicyMetadata(); @RequestMapping(value = "/policies/{policyId}", method = RequestMethod.GET) PolicyContainerDto getPolicies(
			@PathVariable(value = "policyId") String policyId,
			@RequestParam(value = "wildcard", required = false) String wildcard); @RequestMapping(value = "/policies/{policyId}/combined", method = RequestMethod.GET) PolicyDto getPoliciesCombinedAsPolicySet(
			@PathVariable(value = "policyId") String policyId,
			@RequestParam(value = "wildcard", required = false) String wildcard,
			@RequestParam(value = "policySetId", required = false) String policySetId,
			@RequestParam(value = "policyCombiningAlgId", required = true) String policyCombiningAlgId); @RequestMapping(value = "/policyCombiningAlgIds", method = RequestMethod.GET) Map<String, String> getPolicyCombiningAlgIds(); @RequestMapping(value = "/policies/{policyId}", method = RequestMethod.PUT) PolicyMetadataDto updatePolicy(
			@Valid @RequestBody PolicyContentDto updatePolicyRequestDto,
			@PathVariable(value = "policyId") String policyId); }
PolicyControllerV1 extends AbstractPolRepRestApiControllerV1 { @RequestMapping(value = "/policyCombiningAlgIds", method = RequestMethod.GET) public Map<String, String> getPolicyCombiningAlgIds() { return policyService.getPolicyCombiningAlgIds(); }  @RequestMapping(value = "/policies", method = RequestMethod.POST) PolicyMetadataContainerDto addPolicies(
			@Valid @RequestBody PolicyContentContainerDto addPolicyRequestContainerDto,
			@RequestParam(value = "force", required = false) boolean force); @RequestMapping(value = "/policies/{policyId}", method = RequestMethod.DELETE) void deletePolicy(@PathVariable(value = "policyId") String policyId,
			HttpServletResponse response); @RequestMapping(value = "/policies", method = RequestMethod.GET) PolicyMetadataContainerDto getAllPolicyMetadata(); @RequestMapping(value = "/policies/{policyId}", method = RequestMethod.GET) PolicyContainerDto getPolicies(
			@PathVariable(value = "policyId") String policyId,
			@RequestParam(value = "wildcard", required = false) String wildcard); @RequestMapping(value = "/policies/{policyId}/combined", method = RequestMethod.GET) PolicyDto getPoliciesCombinedAsPolicySet(
			@PathVariable(value = "policyId") String policyId,
			@RequestParam(value = "wildcard", required = false) String wildcard,
			@RequestParam(value = "policySetId", required = false) String policySetId,
			@RequestParam(value = "policyCombiningAlgId", required = true) String policyCombiningAlgId); @RequestMapping(value = "/policyCombiningAlgIds", method = RequestMethod.GET) Map<String, String> getPolicyCombiningAlgIds(); @RequestMapping(value = "/policies/{policyId}", method = RequestMethod.PUT) PolicyMetadataDto updatePolicy(
			@Valid @RequestBody PolicyContentDto updatePolicyRequestDto,
			@PathVariable(value = "policyId") String policyId);  }