BusinessObjectDataStorageUnitRestController extends HerdBaseController { @RequestMapping(value = "/businessObjectDataStorageUnits", method = RequestMethod.POST, consumes = {"application/xml", "application/json"}) @Secured(SecurityFunctions.FN_BUSINESS_OBJECT_DATA_STORAGE_UNITS_POST) public BusinessObjectDataStorageUnitCreateResponse createBusinessObjectDataStorageUnit(@RequestBody BusinessObjectDataStorageUnitCreateRequest request) { return businessObjectDataStorageUnitService.createBusinessObjectDataStorageUnit(request); }  @RequestMapping(value = "/businessObjectDataStorageUnits", method = RequestMethod.POST, consumes = {"application/xml", "application/json"}) @Secured(SecurityFunctions.FN_BUSINESS_OBJECT_DATA_STORAGE_UNITS_POST) BusinessObjectDataStorageUnitCreateResponse createBusinessObjectDataStorageUnit(@RequestBody BusinessObjectDataStorageUnitCreateRequest request);  }
@Test public void testCreateBusinessObjectDataStorageUnit() { BusinessObjectDataStorageUnitKey businessObjectDataStorageUnitKey = new BusinessObjectDataStorageUnitKey(BDEF_NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, PARTITION_VALUE, SUBPARTITION_VALUES, DATA_VERSION, STORAGE_NAME); StorageDirectory storageDirectory = new StorageDirectory(STORAGE_DIRECTORY_PATH); List<StorageFile> storageFiles = Collections.singletonList(new StorageFile(FILE_NAME, FILE_SIZE, ROW_COUNT)); BusinessObjectDataStorageUnitCreateRequest request = new BusinessObjectDataStorageUnitCreateRequest(businessObjectDataStorageUnitKey, storageDirectory, storageFiles, DISCOVER_STORAGE_FILES); BusinessObjectDataStorageUnitCreateResponse response = new BusinessObjectDataStorageUnitCreateResponse(businessObjectDataStorageUnitKey, storageDirectory, storageFiles); when(businessObjectDataStorageUnitService.createBusinessObjectDataStorageUnit(request)).thenReturn(response); BusinessObjectDataStorageUnitCreateResponse result = businessObjectDataStorageUnitRestController.createBusinessObjectDataStorageUnit(request); verify(businessObjectDataStorageUnitService).createBusinessObjectDataStorageUnit(request); verifyNoMoreInteractions(businessObjectDataStorageUnitService); assertEquals(response, result); }