In Spring is possible to use *@TestPropertySource* to override some properties or load a specific property file **for the annotated test class**.

Let's say I want to do the same stated above, but I don't want to copy and paste the same code block across all my test classes. Is it possible to have this configuration centralized in a class?

I tried to do something like:

```
@TestPropertySource(
        properties = {
                "DATABASE_URL: jdbc:h2:mem:test;DB_CLOSE_DELAY=-1",
                "DATABASE_DDL-AUTO:create-drop"
        },
        locations = {
                "classpath:persistence-${environment}.yml"
                }
)
@Configuration
public class MyConfigurationClass {

}

```

And later use **@Import** in my class test class, but I didn't make it work.

Is it possible?

Thank you.