add unit test for user vs internal db