### Question:
TalendField extends DatasetField { @Override public String toString() { return "{\"name\":\"" + getName() + "\", \"dataType\":\"" + getDataType() + "\"}"; } TalendField();  TalendField(String name, String type); @Override String toString();  }### Answer:
@Test public void test() { TalendField field = new TalendField(); assertEquals("{\"name\":\"null\", \"dataType\":\"null\"}", field.toString()); assertEquals(SourceType.SDK, field.getSourceType()); assertEquals(GeneratorID.CLOUDERA_NAVIGATOR_APPLICATION_NAMESPACE, field.getNamespace()); field = new TalendField("id", "int"); assertEquals("{\"name\":\"id\", \"dataType\":\"int\"}", field.toString()); assertEquals(SourceType.SDK, field.getSourceType()); assertEquals(GeneratorID.CLOUDERA_NAVIGATOR_APPLICATION_NAMESPACE, field.getNamespace()); }