@Test public void shouldGenerateEmptyJson() { String generatedJson = mdsDataProviderBuilder.generateDataProvider(new SchemaHolder()); assertEquals("", generatedJson); }
@Override public String generateDataProvider(SchemaHolder schemaHolder) { Map<String, Object> model = new HashMap<>(); model.put("schema", schemaHolder); StringWriter writer = new StringWriter(); VelocityEngineUtils.mergeTemplate(velocityEngine, MDS_TASK_DATA_PROVIDER, model, writer); return writer.toString(); }
MDSDataProviderBuilderImpl implements MDSDataProviderBuilder { @Override public String generateDataProvider(SchemaHolder schemaHolder) { Map<String, Object> model = new HashMap<>(); model.put("schema", schemaHolder); StringWriter writer = new StringWriter(); VelocityEngineUtils.mergeTemplate(velocityEngine, MDS_TASK_DATA_PROVIDER, model, writer); return writer.toString(); } }
MDSDataProviderBuilderImpl implements MDSDataProviderBuilder { @Override public String generateDataProvider(SchemaHolder schemaHolder) { Map<String, Object> model = new HashMap<>(); model.put("schema", schemaHolder); StringWriter writer = new StringWriter(); VelocityEngineUtils.mergeTemplate(velocityEngine, MDS_TASK_DATA_PROVIDER, model, writer); return writer.toString(); }  }
MDSDataProviderBuilderImpl implements MDSDataProviderBuilder { @Override public String generateDataProvider(SchemaHolder schemaHolder) { Map<String, Object> model = new HashMap<>(); model.put("schema", schemaHolder); StringWriter writer = new StringWriter(); VelocityEngineUtils.mergeTemplate(velocityEngine, MDS_TASK_DATA_PROVIDER, model, writer); return writer.toString(); }  @Override String generateDataProvider(SchemaHolder schemaHolder); @Resource(name = "mdsVelocityEngine") void setVelocityEngine(VelocityEngine velocityEngine); }
MDSDataProviderBuilderImpl implements MDSDataProviderBuilder { @Override public String generateDataProvider(SchemaHolder schemaHolder) { Map<String, Object> model = new HashMap<>(); model.put("schema", schemaHolder); StringWriter writer = new StringWriter(); VelocityEngineUtils.mergeTemplate(velocityEngine, MDS_TASK_DATA_PROVIDER, model, writer); return writer.toString(); }  @Override String generateDataProvider(SchemaHolder schemaHolder); @Resource(name = "mdsVelocityEngine") void setVelocityEngine(VelocityEngine velocityEngine);  }