Add tests for result behavior