Improve test case for optional properties