add test for rule class