### Question:
ActivityDataIOEditorViewImpl extends BaseModal implements ActivityDataIOEditorView { @Override public void setReadOnly(boolean readOnly) { btnOk.setEnabled(!readOnly); inputAssignmentsWidget.setReadOnly(readOnly); outputAssignmentsWidget.setReadOnly(readOnly); } ActivityDataIOEditorViewImpl(); void init(final Presenter presenter); @Override void onHide(final Event e); @Override void setCustomViewTitle(final String name); @Override void setDefaultViewTitle(); @Override void setInputAssignmentRows(final List<AssignmentRow> inputAssignmentRows); @Override void setOutputAssignmentRows(final List<AssignmentRow> outputAssignmentRows); @Override void setInputAssignmentsVisibility(final boolean visible); @Override void setOutputAssignmentsVisibility(final boolean visible); @Override void setIsInputAssignmentSingleVar(final boolean single); @Override void setIsOutputAssignmentSingleVar(final boolean single); @Override void hideView(); @Override void showView(); @Override List<AssignmentRow> getInputAssignmentData(); @Override List<AssignmentRow> getOutputAssignmentData(); @Override void setPossibleInputAssignmentsDataTypes(final List<String> dataTypeDisplayNames); @Override void setPossibleOutputAssignmentsDataTypes(final List<String> dataTypeDisplayNames); @Override void setInputAssignmentsProcessVariables(final List<String> processVariables); @Override void setOutputAssignmentsProcessVariables(final List<String> processVariables); @Override void setInputAssignmentsDisallowedNames(final Set<String> names); @Override void setReadOnly(boolean readOnly); static final int EXPRESSION_MAX_DISPLAY_LENGTH; }### Answer:
@Test public void testSetReadOnlyTrue() { view.setReadOnly(true); verify(btnSave, times(1)).setEnabled(false); verify(inputAssignmentsWidget, times(1)).setReadOnly(true); verify(outputAssignmentsWidget, times(1)).setReadOnly(true); }
@Test public void testSetReadOnlyFalse() { view.setReadOnly(false); verify(btnSave, times(1)).setEnabled(true); verify(inputAssignmentsWidget, times(1)).setReadOnly(false); verify(outputAssignmentsWidget, times(1)).setReadOnly(false); }