def METHOD_NAME(self):
    faulty_xml = '''<job>
            <whiteboard>job with encoding in XML declaration</whiteboard>
            <recipeSet>
                <recipe>
                    <hostRequires/>
                    <task name="/distribution/check-install" />
                </recipe>
            </recipeSet>
        </job>
        '''
    with self.assertRaises(ClientError) as cm:
        run_client(['bkr', 'job-submit', '-'], input=faulty_xml)
    self.assertIn("You must define either <distroRequires/> or <distro/> element", str(cm.exception))