test_class.file: server/src/test/java/com/abiquo/mailman/RendererManagerTest.java
test_class.identifier: RendererManagerTest
test_case.body: @Test
      public final void testGenerateBody()
      {
          Properties properties = new Properties();
          properties.setProperty("username", "testusername");
          properties.setProperty("password", "testpassword");
          properties.setProperty("name", "testname");
          properties.setProperty("lastname", "testlastname");
          properties.setProperty("lang", "en");
  
          String body = RendererManager.generateBody(properties, "test", "en", "default");
  
          assertTrue((body.indexOf("testlastname") > 0) && (body.indexOf("testname") > 0)
              && (body.indexOf("Hello World!") > 0) && (body.indexOf("en") > 0)
              && (body.indexOf("testusername") > 0) && (body.indexOf("testpassword") > 0));
      }
test_case.class_method_signature: RendererManagerTest.testGenerateBody()
test_case.full_signature: @Test public final void testGenerateBody()
test_case.identifier: testGenerateBody
test_case.invocations: setProperty setProperty setProperty setProperty setProperty generateBody assertTrue indexOf indexOf indexOf indexOf indexOf indexOf
test_case.modifiers: @Test public final
test_case.parameters: ()
test_case.return: void
test_case.signature: void testGenerateBody()
focal_class.declarator: debug = LoggerFactory.getLogger(RendererManager.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger debug = LoggerFactory.getLogger(RendererManager.class);
focal_class.type: Logger
focal_class.var_name: debug
focal_class.file: server/src/main/java/com/abiquo/mailman/RendererManager.java
focal_class.identifier: RendererManager
focal_class.class_method_signature: RendererManager.generateBody(Properties properties, String template, String language,
          String brand)
focal_class.full_signature: public static String generateBody(Properties properties, String template, String language,
          String brand)
focal_class.identifier: generateBody
focal_class.modifiers: public static
focal_class.parameters: (Properties properties, String template, String language,
          String brand)
focal_class.return: String
focal_class.signature: String generateBody(Properties properties, String template, String language,
          String brand)
focal_method.body: public static String generateBody(Properties properties, String template, String language,
          String brand)
      {
          String body = null;
          try
          {
              String name, value;
              VelocityContext c = new VelocityContext();
              Enumeration e = properties.propertyNames();
              while (e.hasMoreElements())
              {
                  name = (String) e.nextElement();
                  value = properties.getProperty(name);
                  c.put(name, value);
              }
              body = VelocityManager.getInstance().merge(template, c, language, brand);
              debug.info("Body renderer:" + body);
  
          }
          catch (Exception e)
          {
              e.printStackTrace();
          }
          return body;
      }
focal_method.class_method_signature: RendererManager.generateBody(Properties properties, String template, String language,
          String brand)
focal_method.full_signature: public static String generateBody(Properties properties, String template, String language,
          String brand)
focal_method.identifier: generateBody
focal_method.invocations: propertyNames hasMoreElements nextElement getProperty put merge getInstance info printStackTrace
focal_method.modifiers: public static
focal_method.parameters: (Properties properties, String template, String language,
          String brand)
focal_method.return: String
focal_method.signature: String generateBody(Properties properties, String template, String language,
          String brand)