@Test
public void testEncodeArray() {

  Assert.assertEquals(null, TempletonUtils.encodeArray((String []) null));
  String[] tmp = new String[0];
  Assert.assertTrue(TempletonUtils.encodeArray(new String[0]).length() == 0);
  tmp = new String[3];
  tmp[0] = "fred";
  tmp[1] = null;
  tmp[2] = "peter,lisa,, barney";
  Assert.assertEquals("fred,,peter" +
         StringUtils.ESCAPE_CHAR + ",lisa" + StringUtils.ESCAPE_CHAR + "," +
         StringUtils.ESCAPE_CHAR + ", barney",
         TempletonUtils.encodeArray(tmp));
}