tests and exceptions