def _servers_localhost_zones_EXISTS(self, method, url, body, headers):
        # create_zone() is a POST. Raise on all other operations to be safe.
        if method != 'POST':
            raise NotImplementedError('Unexpected method: %s' % method)
        payload = json.loads(body)
        domain = payload['name']
        body = json.dumps({'error': "Domain '%s' already exists" % domain})
        return (httplib.UNPROCESSABLE_ENTITY, body, self.base_headers,
                'Unprocessable Entity')
dataset/ETHPy150Open apache/libcloud/libcloud/test/dns/test_powerdns.py/PowerDNSMockHttp._servers_localhost_zones_EXISTS/original