well if tapping/knocking on it helps it work right then it's bad.
there are electrical tests you can do on relay, that would require applying battery voltage to certain terminals and checking for continuity on other terminals. details vary from relay to relay. sometimes they have a diagram imprinted on them, so you know which ones are for reference voltage and others would be signaling terminals, etc. etc.
not sure if Haynes or FSM cover those relays, but some electrical diagrams should have it.
have you checked
www.camrystuff.com (Factory Service Manuals) ?