Identity Store tests. And some changes in Identity Store.