Add tests for ObjecSpec and ArraySpec required option