SpringBeanModelConverter extends AbstractModelConverter<SpringBean, T> { @Override public String getJavaConfig(SpringBean model) { return getJavaConfig(model, model.getId()); } SpringBeanModelConverter(Class<T> sourceModelType); @Override SpringBean convert(String id, T model); @Override String getJavaConfig(SpringBean model);  }
@Test public void testGetJavaConfig() throws Exception { SpringBeanModelConverter<TestActor> converter = new SpringBeanModelConverter<>(TestActor.class); SpringBean springBean = new SpringBean(); springBean.setId(""); springBean.setClazz(TestActor.class.getName()); Property name = new Property(); name.setName("name"); name.setValue("testActor"); springBean.getProperties().add(name); String snippet = converter.getJavaConfig(springBean); Assert.assertEquals(snippet, "\n" + "\t@Bean\n" + "\tpublic TestActor springBean() {\n" + "\t\tTestActor springBean = new TestActor();\n" + "\t\tspringBean.setName(\"testActor\");\n" + "\t\treturn springBean;\n" + "\t}\n"); }