class MyTestResource implements TestResourcesResolver { public static final String MY_TEST_PROPERTY = "my.user.name"; @Override public List<String> getResolvableProperties(Map<String, Collection<String>> propertyEntries, Map<String, Object> testResourcesConfig) { return Collections.singletonList(MY_TEST_PROPERTY); } @Override public Optional<String> resolve(String propertyName, Map<String, Object> properties, Map<String, Object> testResourcesConfiguration) { if (MY_TEST_PROPERTY.equals(propertyName)) { return Optional.of("world"); } return Optional.empty(); } }