mock the retry decorator and hook
add a mock, and few tests

add the retry decorator mock
test rating function
test role deciding function
add rating and role functions