unit test for entities in memory