FieldInjector { static Set<String> inject(Object target, Map<String, String> props) { return inject(target, props, ""); }    }
@Test public void test() { final Map<String, String> map = new HashMap<>(); map.put("a", "1"); map.put("b.a", "toto"); map.put("b.nonExistingField", "bar"); map.put("c", null); final Sample sample = new Sample(); FieldInjector.inject(sample, map); Assert.assertEquals(1, sample.a); Assert.assertEquals("toto", sample.b.a); Assert.assertTrue(sample.c); }