PropertiesUtil { public static <T> void configureParams(T instance, Properties properties, InjectorProxy injectorProxy) { requireNonNull(instance); requireNonNull(properties); requireNonNull(injectorProxy); traverseFields(instance.getClass()) .filter(f -> f.isAnnotationPresent(Config.class)) .forEach(f -> configure(instance, properties, injectorProxy, f)); } private  PropertiesUtil(); static Properties loadProperties(Logger logger, File configFile); static void configureParams(T instance, Properties properties, InjectorProxy injectorProxy);  }
@Test void configureParams() { final Foo foo = new Foo(); final Properties properties = PropertiesUtil.loadProperties(LOGGER, file("test.properties")); PropertiesUtil.configureParams(foo, properties, new MyInjectorProxy()); assertEquals("1", foo.val); }