Add tests for correctness