def METHOD_NAME(self, m):
    m.put('https://xcube-gen.test/api/v1/jobs/tomtom/iamajob/callback', json={})
    progress_state = ProgressState(label='test', total_work=0., super_work=10.)
    observer = ApiProgressCallbackObserver(self._callback_config)
    observer.on_begin(state_stack=[progress_state])
    with self.assertRaises(ValueError) as e:
        self._callback_config.api_uri = None
        observer = ApiProgressCallbackObserver(self._callback_config)
        observer.on_begin(state_stack=[progress_state])
    self.assertEqual('Both, api_uri and access_token must be given.', str(e.exception))
    with self.assertRaises(ValueError) as e:
        self._callback_config.access_token = None
        observer = ApiProgressCallbackObserver(self._callback_config)
        observer.on_begin(state_stack=[progress_state])
    self.assertEqual('Both, api_uri and access_token must be given.', str(e.exception))