Refactor caplib tests
Itegration of alert CAP rules