Improving testability of rest revoverPanic call and adding tests