  def testGenerateVolumeName(self, mock_ec2_api):
    """Test the generation of AWS volume name tag.

    The volume name tag must comply with the following RegEx: ^.{1,255}$
        i.e., it must be between 1 and 255 chars.
    """
    caller_identity = mock_ec2_api.return_value.get_caller_identity
    caller_identity.return_value = aws_mocks.MOCK_CALLER_IDENTITY
    # pylint: disable=protected-access
    volume_name = aws_mocks.FAKE_AWS_ACCOUNT.ebs._GenerateVolumeName(
        aws_mocks.FAKE_SNAPSHOT)
    self.assertEqual('fake-snapshot-d69d57c3-copy', volume_name)

    volume_name = aws_mocks.FAKE_AWS_ACCOUNT.ebs._GenerateVolumeName(
        aws_mocks.FAKE_SNAPSHOT, volume_name_prefix='prefix')
    # pylint: enable=protected-access
    self.assertEqual('prefix-fake-snapshot-d69d57c3-copy', volume_name)
Test the generation of AWS volume name tag.

The volume name tag must comply with the following RegEx: ^.{1,255}$
i.e., it must be between 1 and 255 chars.
tests/providers/aws/internal/test_ebs.py