BusinessObjectDefinitionColumnRestController extends HerdBaseController { @RequestMapping(value = BUSINESS_OBJECT_DEFINITION_COLUMNS_URI_PREFIX + "/namespaces/{namespace}" + "/businessObjectDefinitionNames/{businessObjectDefinitionName}", method = RequestMethod.GET) @Secured(SecurityFunctions.FN_BUSINESS_OBJECT_DEFINITION_COLUMNS_ALL_GET) public BusinessObjectDefinitionColumnKeys getBusinessObjectDefinitionColumns(@PathVariable("namespace") String namespace, @PathVariable("businessObjectDefinitionName") String businessObjectDefinitionName) { return businessObjectDefinitionColumnService .getBusinessObjectDefinitionColumns(new BusinessObjectDefinitionKey(namespace, businessObjectDefinitionName)); }  @RequestMapping(value = BUSINESS_OBJECT_DEFINITION_COLUMNS_URI_PREFIX, method = RequestMethod.POST, consumes = {"application/xml", "application/json"}) @Secured(SecurityFunctions.FN_BUSINESS_OBJECT_DEFINITION_COLUMNS_POST) BusinessObjectDefinitionColumn createBusinessObjectDefinitionColumn(@RequestBody BusinessObjectDefinitionColumnCreateRequest request); @RequestMapping(value = BUSINESS_OBJECT_DEFINITION_COLUMNS_URI_PREFIX + "/namespaces/{namespace}" + "/businessObjectDefinitionNames/{businessObjectDefinitionName}" + "/businessObjectDefinitionColumnNames/{businessObjectDefinitionColumnName}", method = RequestMethod.GET) @Secured(SecurityFunctions.FN_BUSINESS_OBJECT_DEFINITION_COLUMNS_GET) BusinessObjectDefinitionColumn getBusinessObjectDefinitionColumn(@PathVariable("namespace") String namespace,
        @PathVariable("businessObjectDefinitionName") String businessObjectDefinitionName,
        @PathVariable("businessObjectDefinitionColumnName") String businessObjectDefinitionColumnName,
        @RequestParam(value = "includeBusinessObjectDefinitionColumnUpdateHistory", required = false)
            Boolean includeBusinessObjectDefinitionColumnUpdateHistory); @RequestMapping(value = BUSINESS_OBJECT_DEFINITION_COLUMNS_URI_PREFIX + "/namespaces/{namespace}" + "/businessObjectDefinitionNames/{businessObjectDefinitionName}" + "/businessObjectDefinitionColumnNames/{businessObjectDefinitionColumnName}", method = RequestMethod.PUT, consumes = {"application/xml", "application/json"}) @Secured(SecurityFunctions.FN_BUSINESS_OBJECT_DEFINITION_COLUMNS_PUT) BusinessObjectDefinitionColumn updateBusinessObjectDefinitionColumn(@PathVariable("namespace") String namespace,
        @PathVariable("businessObjectDefinitionName") String businessObjectDefinitionName,
        @PathVariable("businessObjectDefinitionColumnName") String businessObjectDefinitionColumnName,
        @RequestBody BusinessObjectDefinitionColumnUpdateRequest request); @RequestMapping(value = BUSINESS_OBJECT_DEFINITION_COLUMNS_URI_PREFIX + "/namespaces/{namespace}" + "/businessObjectDefinitionNames/{businessObjectDefinitionName}" + "/businessObjectDefinitionColumnNames/{businessObjectDefinitionColumnName}", method = RequestMethod.DELETE) @Secured(SecurityFunctions.FN_BUSINESS_OBJECT_DEFINITION_COLUMNS_DELETE) BusinessObjectDefinitionColumn deleteBusinessObjectDefinitionColumn(@PathVariable("namespace") String namespace,
        @PathVariable("businessObjectDefinitionName") String businessObjectDefinitionName,
        @PathVariable("businessObjectDefinitionColumnName") String businessObjectDefinitionColumnName); @RequestMapping(value = BUSINESS_OBJECT_DEFINITION_COLUMNS_URI_PREFIX + "/namespaces/{namespace}" + "/businessObjectDefinitionNames/{businessObjectDefinitionName}", method = RequestMethod.GET) @Secured(SecurityFunctions.FN_BUSINESS_OBJECT_DEFINITION_COLUMNS_ALL_GET) BusinessObjectDefinitionColumnKeys getBusinessObjectDefinitionColumns(@PathVariable("namespace") String namespace,
        @PathVariable("businessObjectDefinitionName") String businessObjectDefinitionName); @RequestMapping(value = BUSINESS_OBJECT_DEFINITION_COLUMNS_URI_PREFIX + "/search", method = RequestMethod.POST, consumes = {"application/xml", "application/json"}) @Secured(SecurityFunctions.FN_BUSINESS_OBJECT_DEFINITION_COLUMNS_SEARCH_POST) BusinessObjectDefinitionColumnSearchResponse searchBusinessObjectDefinitionColumns(
        @RequestParam(value = "fields", required = false, defaultValue = "") Set<String> fields,
        @RequestBody BusinessObjectDefinitionColumnSearchRequest request); static final String BUSINESS_OBJECT_DEFINITION_COLUMNS_URI_PREFIX; }
@Test public void testGetBusinessObjectDefinitionColumns() { businessObjectDefinitionColumnDaoTestHelper .createBusinessObjectDefinitionColumnEntity(new BusinessObjectDefinitionColumnKey(BDEF_NAMESPACE, BDEF_NAME, BDEF_COLUMN_NAME_2), DESCRIPTION_2); businessObjectDefinitionColumnDaoTestHelper .createBusinessObjectDefinitionColumnEntity(new BusinessObjectDefinitionColumnKey(BDEF_NAMESPACE, BDEF_NAME, BDEF_COLUMN_NAME), DESCRIPTION); BusinessObjectDefinitionColumnKeys businessObjectDefinitionColumnKeys = new BusinessObjectDefinitionColumnKeys(Lists.newArrayList(new BusinessObjectDefinitionColumnKey(BDEF_NAMESPACE, BDEF_NAME, BDEF_COLUMN_NAME_2))); BusinessObjectDefinitionKey businessObjectDefinitionKey = new BusinessObjectDefinitionKey(BDEF_NAMESPACE, BDEF_NAME); when(businessObjectDefinitionColumnService.getBusinessObjectDefinitionColumns(businessObjectDefinitionKey)) .thenReturn(businessObjectDefinitionColumnKeys); BusinessObjectDefinitionColumnKeys resultBusinessObjectDefinitionColumnKeys = businessObjectDefinitionColumnRestController.getBusinessObjectDefinitionColumns(BDEF_NAMESPACE, BDEF_NAME); verify(businessObjectDefinitionColumnService).getBusinessObjectDefinitionColumns(businessObjectDefinitionKey); verifyNoMoreInteractions(businessObjectDefinitionColumnService); assertEquals(businessObjectDefinitionColumnKeys, resultBusinessObjectDefinitionColumnKeys); }