Add unit test similar to the one of OwnIdentity in the second to the
last commit