add rewire, use it in adding authenticationManager tests