The setProperty() and withProperty() methods in MockEnvironment currently have (String, String) signatures; whereas, they should actually have (String, Object) signatures to match the corresponding signatures in MockPropertySource as well as the Object getProperty(String) declaration in PropertySource.