'If the old deployment and the new deployment are equivalent, registered
callbacks are not called.'

@validate_logging(assertHasMessage, _LOG_UNCHANGED_DEPLOYMENT_NOT_SAVED)
def test_callback_not_called_for_unchanged_deployment(self, logger):

    service = self.service(FilePath(self.mktemp()), logger)
    state = []
    def callback():
        state.append(None)
    saving = service.save(LATEST_TEST_DEPLOYMENT)
    def saved_old(ignored):
        service.register(callback)
        return service.save(LATEST_TEST_DEPLOYMENT)
    saving.addCallback(saved_old)
    def saved_new(ignored):
        self.assertEqual([], state, 'Registered    callback    was    called;    should    not    have    been.')
    saving.addCallback(saved_new)
    return saving
