Have application-test.properties file with only the property you want to override, and set active profile to test.
Spring boot automatically merges properties from application-test.properties and application.properties files. Property mentioned in application-test.properties overrides the property mentioned in application.properties.
See this post about setting active profile: Setting the default active profile in Spring-boot