BusinessObjectDefinitionTagRestController extends HerdBaseController { @RequestMapping(value = BUSINESS_OBJECT_DEFINITION_TAGS_URI_PREFIX + "/namespaces/{namespace}" + "/businessObjectDefinitionNames/{businessObjectDefinitionName}", method = RequestMethod.GET) @Secured(SecurityFunctions.FN_BUSINESS_OBJECT_DEFINITION_TAGS_BY_BUSINESS_OBJECT_DEFINITION_GET) public BusinessObjectDefinitionTagKeys getBusinessObjectDefinitionTagsByBusinessObjectDefinition(@PathVariable(value = "namespace") String namespace, @PathVariable(value = "businessObjectDefinitionName") String businessObjectDefinitionName) { return businessObjectDefinitionTagService .getBusinessObjectDefinitionTagsByBusinessObjectDefinition(new BusinessObjectDefinitionKey(namespace, businessObjectDefinitionName)); }  @RequestMapping(value = BUSINESS_OBJECT_DEFINITION_TAGS_URI_PREFIX, method = RequestMethod.POST, consumes = {"application/xml", "application/json"}) @Secured(SecurityFunctions.FN_BUSINESS_OBJECT_DEFINITION_TAGS_POST) BusinessObjectDefinitionTag createBusinessObjectDefinitionTag(@RequestBody BusinessObjectDefinitionTagCreateRequest request); @RequestMapping(value = BUSINESS_OBJECT_DEFINITION_TAGS_URI_PREFIX + "/namespaces/{namespace}" + "/businessObjectDefinitionNames/{businessObjectDefinitionName}" + "/tagTypes/{tagTypeCode}" + "/tagCodes/{tagCode}", method = RequestMethod.DELETE) @Secured(SecurityFunctions.FN_BUSINESS_OBJECT_DEFINITION_TAGS_DELETE) BusinessObjectDefinitionTag deleteBusinessObjectDefinitionTag(@PathVariable("namespace") String namespace,
        @PathVariable("businessObjectDefinitionName") String businessObjectDefinitionName, @PathVariable("tagTypeCode") String tagTypeCode,
        @PathVariable("tagCode") String tagCode); @RequestMapping(value = BUSINESS_OBJECT_DEFINITION_TAGS_URI_PREFIX + "/namespaces/{namespace}" + "/businessObjectDefinitionNames/{businessObjectDefinitionName}", method = RequestMethod.GET) @Secured(SecurityFunctions.FN_BUSINESS_OBJECT_DEFINITION_TAGS_BY_BUSINESS_OBJECT_DEFINITION_GET) BusinessObjectDefinitionTagKeys getBusinessObjectDefinitionTagsByBusinessObjectDefinition(@PathVariable(value = "namespace") String namespace,
        @PathVariable(value = "businessObjectDefinitionName") String businessObjectDefinitionName); @RequestMapping(value = BUSINESS_OBJECT_DEFINITION_TAGS_URI_PREFIX + "/tagTypes/{tagTypeCode}" + "/tagCodes/{tagCode}", method = RequestMethod.GET) @Secured(SecurityFunctions.FN_BUSINESS_OBJECT_DEFINITION_TAGS_BY_TAG_GET) BusinessObjectDefinitionTagKeys getBusinessObjectDefinitionTagsByTag(@PathVariable(value = "tagTypeCode") String tagTypeCode,
        @PathVariable(value = "tagCode") String tagCode); static final String BUSINESS_OBJECT_DEFINITION_TAGS_URI_PREFIX; }
@Test public void testGetBusinessObjectDefinitionTagsByBusinessObjectDefinition() { BusinessObjectDefinitionKey businessObjectDefinitionKey = new BusinessObjectDefinitionKey(BDEF_NAMESPACE, BDEF_NAME); List<TagKey> tagKeys = Arrays.asList(new TagKey(TAG_TYPE, TAG_CODE), new TagKey(TAG_TYPE_2, TAG_CODE_2)); BusinessObjectDefinitionTagKey businessObjectDefinitionTagKey = new BusinessObjectDefinitionTagKey(businessObjectDefinitionKey, new TagKey(TAG_TYPE, TAG_CODE)); BusinessObjectDefinitionTagKeys BusinessObjectDefinitionTagKeys = new BusinessObjectDefinitionTagKeys(Arrays.asList(businessObjectDefinitionTagKey)); when(businessObjectDefinitionTagService.getBusinessObjectDefinitionTagsByBusinessObjectDefinition(businessObjectDefinitionKey)) .thenReturn(BusinessObjectDefinitionTagKeys); BusinessObjectDefinitionTagKeys result = businessObjectDefinitionTagRestController.getBusinessObjectDefinitionTagsByBusinessObjectDefinition(BDEF_NAMESPACE, BDEF_NAME); verify(businessObjectDefinitionTagService).getBusinessObjectDefinitionTagsByBusinessObjectDefinition(businessObjectDefinitionKey); verifyNoMoreInteractions(businessObjectDefinitionTagService); assertEquals(BusinessObjectDefinitionTagKeys, result); }