source: class CamelPropertiesHelperTest {
  
      @Autowired ApplicationContext context;
      @Autowired CamelContext camelContext;
  
      @Test
      public void testSetCamelPropertiesClass() throws Exception {
  
target:         MyClass target = new MyClass();
  
          // must use linked hash map as we must create foo first before we set its name as nested property
          Map<String, Object> map = new LinkedHashMap<>();
          map.put("id", "123");
          map.put("name", "Donald Duck");
          map.put("option", "myCoolOption");
          map.put("camelContext", "#type:org.apache.camel.CamelContext");
          map.put("myFooClass", "#class:org.apache.camel.spring.boot.util.MyFooClass");
          map.put("myFooClass.name", "Goofy");
  
          CamelPropertiesHelper.setCamelProperties(camelContext, target, map, true);
  
          Assert.assertEquals("Should configure all options", 0, map.size());
          Assert.assertEquals(123, target.getId());
          Assert.assertEquals("Donald Duck", target.getName());
          Assert.assertSame(context.getBean("myCoolOption"), target.getOption());
          Assert.assertSame(camelContext, target.getCamelContext());
  
          MyFooClass myFooClass = target.getMyFooClass();
          Assert.assertNotNull(myFooClass);
          Assert.assertSame(camelContext, myFooClass.getCamelContext());
          Assert.assertEquals("Goofy", myFooClass.getName());
      }
  
  }