org.springframework.mock.env包包含了Environment和PropertySource抽象的模拟实现(见第7.13.1节“Bean定义配置文件”和第7.13.2节“PropertySource抽象”)。 MockEnvironment和MockPropertySource可用于开发针对依赖环境特性的代码的容器外测试。