'Volume created with given profile has the attributes
expected from the profile.
:param ValueConstant profile: Name of profile to use for creation.
:param ValueConstant created_profile: Name of the profile volume is
expected to be created with.
:param int size_GiB: Size of volume to be created.'

def _assert_create_volume_with_mandatory_profile(self, profile, created_profile=None, size_GiB=4):

    if (created_profile is None):
        created_profile = profile
    volume1 = self.api.create_volume_with_profile(dataset_id=uuid4(), size=(self.minimum_allocatable_size * size_GiB), profile_name=profile.value)
    cannonical_profile = MandatoryProfiles.lookupByValue(created_profile.value)
    A = EBSMandatoryProfileAttributes.lookupByName(cannonical_profile.name).value
    ebs_volume = self.api._get_ebs_volume(volume1.blockdevice_id)
    self.assertEqual(ebs_volume.volume_type, A.volume_type.value)
    requested_iops = A.requested_iops(ebs_volume.size)
    self.assertEqual((ebs_volume.iops if (requested_iops is not None) else None), requested_iops)
