### Question:
MultipleInstanceVariableEditorPresenter extends FieldEditorPresenter<String> { static String getFirstIfExistsOrSecond(String first, String second) { return isNullOrEmpty(first) ? second : first; } @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 testFirstIfExistsOrSecond() { String first; String second = "some value"; assertEquals(second, getFirstIfExistsOrSecond(null, second)); first = ""; assertEquals(second, getFirstIfExistsOrSecond(first, second)); first = "new value"; assertEquals(first, getFirstIfExistsOrSecond(first, second)); }