Add tests for required attribute