Add comprehensive tests.