BusinessObjectDefinitionSubjectMatterExpertRestController extends HerdBaseController { @RequestMapping(value = BUSINESS_OBJECT_DEFINITION_SUBJECT_MATTER_EXPERTS_URI_PREFIX, method = RequestMethod.POST, consumes = {"application/xml", "application/json"}) @Secured(SecurityFunctions.FN_BUSINESS_OBJECT_DEFINITION_SUBJECT_MATTER_EXPERTS_POST) public BusinessObjectDefinitionSubjectMatterExpert createBusinessObjectDefinitionSubjectMatterExpert( @RequestBody BusinessObjectDefinitionSubjectMatterExpertCreateRequest request) { return businessObjectDefinitionSubjectMatterExpertService.createBusinessObjectDefinitionSubjectMatterExpert(request); }  @RequestMapping(value = BUSINESS_OBJECT_DEFINITION_SUBJECT_MATTER_EXPERTS_URI_PREFIX, method = RequestMethod.POST, consumes = {"application/xml", "application/json"}) @Secured(SecurityFunctions.FN_BUSINESS_OBJECT_DEFINITION_SUBJECT_MATTER_EXPERTS_POST) BusinessObjectDefinitionSubjectMatterExpert createBusinessObjectDefinitionSubjectMatterExpert(
        @RequestBody BusinessObjectDefinitionSubjectMatterExpertCreateRequest request); @RequestMapping(value = BUSINESS_OBJECT_DEFINITION_SUBJECT_MATTER_EXPERTS_URI_PREFIX + "/namespaces/{namespace}" + "/businessObjectDefinitionNames/{businessObjectDefinitionName}" + "/userIds/{userId}", method = RequestMethod.DELETE) @Secured(SecurityFunctions.FN_BUSINESS_OBJECT_DEFINITION_SUBJECT_MATTER_EXPERTS_DELETE) BusinessObjectDefinitionSubjectMatterExpert deleteBusinessObjectDefinitionSubjectMatterExpert(@PathVariable("namespace") String namespace,
        @PathVariable("businessObjectDefinitionName") String businessObjectDefinitionName, @PathVariable("userId") String userId); @RequestMapping(value = BUSINESS_OBJECT_DEFINITION_SUBJECT_MATTER_EXPERTS_URI_PREFIX + "/namespaces/{namespace}" + "/businessObjectDefinitionNames/{businessObjectDefinitionName}", method = RequestMethod.GET) @Secured(SecurityFunctions.FN_BUSINESS_OBJECT_DEFINITION_SUBJECT_MATTER_EXPERTS_BY_BUSINESS_OBJECT_DEFINITION_GET) BusinessObjectDefinitionSubjectMatterExpertKeys getBusinessObjectDefinitionSubjectMatterExpertsByBusinessObjectDefinition(
        @PathVariable("namespace") String namespace, @PathVariable("businessObjectDefinitionName") String businessObjectDefinitionName); static final String BUSINESS_OBJECT_DEFINITION_SUBJECT_MATTER_EXPERTS_URI_PREFIX; }
@Test public void testCreateBusinessObjectDefinitionSubjectMatterExpert() { BusinessObjectDefinitionSubjectMatterExpertKey key = new BusinessObjectDefinitionSubjectMatterExpertKey(BDEF_NAMESPACE, BDEF_NAME, USER_ID); BusinessObjectDefinitionSubjectMatterExpertCreateRequest request = new BusinessObjectDefinitionSubjectMatterExpertCreateRequest(key); BusinessObjectDefinitionSubjectMatterExpert businessObjectDefinitionSubjectMatterExpert = new BusinessObjectDefinitionSubjectMatterExpert(ID, key); when(businessObjectDefinitionSubjectMatterExpertService.createBusinessObjectDefinitionSubjectMatterExpert(request)) .thenReturn(businessObjectDefinitionSubjectMatterExpert); BusinessObjectDefinitionSubjectMatterExpert resultBusinessObjectDefinitionSubjectMatterExpert = businessObjectDefinitionSubjectMatterExpertRestController.createBusinessObjectDefinitionSubjectMatterExpert(request); verify(businessObjectDefinitionSubjectMatterExpertService).createBusinessObjectDefinitionSubjectMatterExpert(request); verifyNoMoreInteractions(businessObjectDefinitionSubjectMatterExpertService); assertEquals(businessObjectDefinitionSubjectMatterExpert, resultBusinessObjectDefinitionSubjectMatterExpert); }