Add unique_entity concept and unit test.