@capture_logging(lambda self, logger: None)
    def test_boto_ec2response_error(self, logger):
        # Test 1: Create volume with size 0.
        # Raises: ClientError
        self.assertRaises(ClientError, self.api.create_volume,
                          dataset_id=uuid4(), size=0,)

        # Test 2: Set EC2 connection zone to an invalid string.
        # Raises: ClientError
        self.api.zone = u'invalid_zone'
        self.assertRaises(
            ClientError,
            self.api.create_volume,
            dataset_id=uuid4(),
            size=self.minimum_allocatable_size,
        )

        # Validate decorated method for exception logging
        # actually logged to ``Eliot`` logger.
        expected_message_keys = {AWS_CODE.key, AWS_MESSAGE.key,
                                 AWS_REQUEST_ID.key}
        for logged in LoggedAction.of_type(logger.messages, AWS_ACTION,):
            key_subset = set(key for key in expected_message_keys
                             if key in logged.end_message.keys())
            self.assertEqual(expected_message_keys, key_subset)
1. Invalid parameters to Boto's EBS API calls
dataset/ETHPy150Open ClusterHQ/flocker/flocker/node/agents/functional/test_ebs.py/EBSBlockDeviceAPIInterfaceTests.test_boto_ec2response_error