fix labeling errors
Add rule entity insert test
Add rule entity save test