@Test
public void testValidateBusinessObjectDataStorageUnitCreateRequestInvalidParameters()
{

    // Try to call the method under test when create request is not specified.
    try
    {
        businessObjectDataStorageUnitServiceImpl.validateBusinessObjectDataStorageUnitCreateRequest(null);
        fail();
    }
    catch (IllegalArgumentException e)
    {
        assertEquals("A business object data storage unit create request must be specified.", e.getMessage());
    }
    // Try to call the method under test when auto-discovery is enabled and storage directory is not specified.
    try
    {
        businessObjectDataStorageUnitServiceImpl.validateBusinessObjectDataStorageUnitCreateRequest(new BusinessObjectDataStorageUnitCreateRequest(
            new BusinessObjectDataStorageUnitKey(BDEF_NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, PARTITION_VALUE,
                SUBPARTITION_VALUES, DATA_VERSION, STORAGE_NAME), NO_STORAGE_DIRECTORY, NO_STORAGE_FILES, DISCOVER_STORAGE_FILES));
        fail();
    }
    catch (IllegalArgumentException e)
    {
        assertEquals("A storage directory must be specified when discovery of storage files is enabled.", e.getMessage());
    }
    // Try to call the method under test when auto-discovery is enabled and storage files are specified.
    try
    {
        businessObjectDataStorageUnitServiceImpl.validateBusinessObjectDataStorageUnitCreateRequest(new BusinessObjectDataStorageUnitCreateRequest(
            new BusinessObjectDataStorageUnitKey(BDEF_NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, PARTITION_VALUE,
                SUBPARTITION_VALUES, DATA_VERSION, STORAGE_NAME), new StorageDirectory(STORAGE_DIRECTORY_PATH),
            Collections.singletonList(new StorageFile(FILE_NAME, FILE_SIZE, ROW_COUNT)), DISCOVER_STORAGE_FILES));
        fail();
    }
    catch (IllegalArgumentException e)
    {
        assertEquals("Storage files cannot be specified when discovery of storage files is enabled.", e.getMessage());
    }
    // Try to call the method under test when auto-discovery is not enabled and no storage directory or files are specified.
    try
    {
        businessObjectDataStorageUnitServiceImpl.validateBusinessObjectDataStorageUnitCreateRequest(new BusinessObjectDataStorageUnitCreateRequest(
            new BusinessObjectDataStorageUnitKey(BDEF_NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, PARTITION_VALUE,
                SUBPARTITION_VALUES, DATA_VERSION, STORAGE_NAME), NO_STORAGE_DIRECTORY, NO_STORAGE_FILES, NO_DISCOVER_STORAGE_FILES));
        fail();
    }
    catch (IllegalArgumentException e)
    {
        assertEquals("A storage directory or at least one storage file must be specified when discovery of storage files is not enabled.", e.getMessage());
    }
    // Try to call the method under test when storage directory is specified with a blank storage directory path.
    try
    {
        businessObjectDataStorageUnitServiceImpl.validateBusinessObjectDataStorageUnitCreateRequest(new BusinessObjectDataStorageUnitCreateRequest(
            new BusinessObjectDataStorageUnitKey(BDEF_NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, PARTITION_VALUE,
                SUBPARTITION_VALUES, DATA_VERSION, STORAGE_NAME), new StorageDirectory(BLANK_TEXT), NO_STORAGE_FILES, NO_DISCOVER_STORAGE_FILES));
        fail();
    }
    catch (IllegalArgumentException e)
    {
        assertEquals("A storage directory path must be specified.", e.getMessage());
    }
}