@Test
public void testBodyEventDefinedTemplate() {

    Map<String, Object> data = new HashMap<>();
    data.put("body.template.location", this.getClass().getClassLoader().getResource("propertyBodyTemplate.vm").getPath());
    data.put("test.name", "test");
    data.put("threadCount", 100);
    Event event = new Event("foo", data);
    String body = formatter.formatBody(null, event);
    Assert.assertTrue(body.contains("This is test using property defined template."));
    Assert.assertTrue(body.contains("It seems to work fine for 100"));
}