I have a @SpringBootTest which is used to execute an integration test on the server. Depending on the configuration I want the server to behave differently. The configuration itself is read by beans (scope = singleton) deep inside my app logic and they read the property via @Value annotation.
How could I execute the same test with different configuration settings? I have tried to write different test classes and annotate them with @TestPropertySource(properties = XYZ). But it seems that this affects all other tests as well (due to the singleton scope?). It there a way to reset the properties after the test?
To respecify my problem: I want to configure my bean with a different @Value property during my tests and this value should only be valid throughout this specific test execution.
Thanks ahead for any pointers.