def METHOD_NAME(self):
    portstr = "tcp:0:interface=127.0.0.1"
    reg = yield self.pbm.register(portstr, "boris", "pass", self.perspectiveFactory)
    disp = self.pbm.dispatchers[portstr]
    d = disp.requestAvatarId(credentials.UsernamePassword(b'boris', b'pass'))
    self.assertTrue(d.called,
        "requestAvatarId should have been called since the lock is free")
    yield reg.unregister()