Add unit tests for entity state computation.