Added validity tests.