### Question:
ClouderaFieldConvertor { public static List<TalendField> convertToTalendField(Map<String, String> columns) { List<TalendField> talendFields = new ArrayList<TalendField>(); if (MapUtils.isNotEmpty(columns)) { for (Entry<String, String> column : columns.entrySet()) { talendFields.add(new TalendField(column.getKey(), column.getValue())); } } return talendFields; }  static List<TalendField> convertToTalendField(Map<String, String> columns);  }### Answer:
@Test public void testConvertToTalendField() { assertNotNull(ClouderaFieldConvertor.convertToTalendField(null).size()); assertEquals(0, ClouderaFieldConvertor.convertToTalendField(null).size()); Map<String, String> schema = new HashMap<String, String>(); schema.put("id", "int"); schema.put("name", "String"); List<TalendField> fields = ClouderaFieldConvertor.convertToTalendField(schema); assertNotNull(fields); assertEquals("[{\"name\":\"name\", \"dataType\":\"String\"}, {\"name\":\"id\", \"dataType\":\"int\"}]", fields.toString()); }