tests and defenses