### Question:
MultipleInstanceVariableEditorPresenter extends FieldEditorPresenter<String> { static String getDataType(Variable variable) { if (!isNullOrEmpty(variable.getCustomDataType())) { return variable.getCustomDataType(); } return isNullOrEmpty(variable.getDataType()) ? "Object" : variable.getDataType(); } @Inject  MultipleInstanceVariableEditorPresenter(final View view,
                                                   final SessionManager sessionManager); @PostConstruct void init(); @Override void setValue(String value); List<String> getSimpleDataTypes(); @Override void setReadOnly(boolean readOnly); void onVariableChange(); Path getDiagramPath(); static Map<String, String> getMapDataTypeNamesToDisplayNames();  }### Answer:
@Test public void testCustomDataType() { String customType = "java.util.List"; Variable variable = new Variable("input", Variable.VariableType.INPUT, null, customType); assertEquals(customType, getDataType(variable)); variable.setDataType("java.lang.Float"); assertEquals(customType, getDataType(variable)); }
@Test public void testDefaultVariableType() { Variable variable = new Variable("input", Variable.VariableType.INPUT, null, null); assertEquals("Object", getDataType(variable)); }
@Test public void testDataType() { String dataType = "java.lang.Float"; Variable variable = new Variable("input", Variable.VariableType.INPUT, dataType, null); assertEquals(dataType, getDataType(variable)); }