### Question:
OpenAnalysisJobAsTemplateDialog extends AbstractDialog { public void refreshOpenButtonVisibility() { if (_datastore == null) { _openButton.setEnabled(false); return; } for (final List<SourceColumnComboBox> comboBoxes : _sourceColumnComboBoxes.values()) { for (final SourceColumnComboBox comboBox : comboBoxes) { if (comboBox.getSelectedItem() == null) { _openButton.setEnabled(false); return; } } } _openButton.setEnabled(true); } OpenAnalysisJobAsTemplateDialog(final WindowContext windowContext,
            final DataCleanerConfiguration configuration, final FileObject file, final AnalysisJobMetadata metadata,
            final Provider<OpenAnalysisJobActionListener> openAnalysisJobActionListenerProvider); static LoadingIcon createLoadingIcon(); void refreshOpenButtonVisibility(); SourceColumnMapping getSourceColumnMapping(); @Override String getWindowTitle();  }### Answer:
@Test public void testRefreshOpenButtonVisibility() throws Exception { if (!GraphicsEnvironment.isHeadless()) { getDialog().refreshOpenButtonVisibility(); } }