Add unit test for entity