# Package org.springframework.mock.env

@NonNullApi @NonNullFields package org.springframework.mock.env
This package contains mock implementations of the `Environment` and `PropertySource` abstractions.

These mocks are useful for developing out-of-container unit tests for code that depends on environment-specific properties.

Classes
Class
Description
MockEnvironment
Simple `ConfigurableEnvironment` implementation exposing `MockEnvironment.setProperty(java.lang.String, java.lang.Object)` and `MockEnvironment.withProperty(java.lang.String, java.lang.Object)` methods for testing purposes.
MockPropertySource
Simple `PropertySource` implementation for use in testing.