### Question:
DriverDefEditor extends BaseEditor<DriverDefEditorContent, Metadata> implements DriverDefEditorView.Presenter { protected DriverDefEditorContent getContent( ) { return editorContent; } @Inject  DriverDefEditor( final DriverDefEditorView view,
                            final DriverDefMainPanel mainPanel,
                            final DriverDefEditorHelper editorHelper,
                            final PopupsUtil popupsUtil,
                            final PlaceManager placeManager,
                            final DriverDefType type,
                            final SavePopUpPresenter savePopUpPresenter,
                            final DeletePopUpPresenter deletePopUpPresenter,
                            final Caller< DriverDefEditorService > editorService,
                            final Caller< DataSourceRuntimeManagerClientService > dataSourceManagerClient ); @OnStartup void onStartup( final ObservablePath path, final PlaceRequest place ); @WorkbenchPartTitleDecoration IsWidget getTitle( ); @WorkbenchPartTitle String getTitleText( ); @WorkbenchPartView IsWidget getWidget( ); @OnMayClose boolean onMayClose( ); @Override boolean mayClose( Integer currentHash ); @Override void onSave( ); @Override void onCancel( ); @Override void onDelete( );  }### Answer:
@Test public void testLoadFileSuccessFul() { prepareLoadFileSuccessful(); verify( view, times( 1 ) ).showLoading(); verify( view, times( 1 ) ).hideBusyIndicator(); assertEquals( content, editor.getContent() ); verify( mainPanelView, times( 1 ) ).setName( content.getDef().getName() ); verify( mainPanelView, times( 1 ) ).setGroupId( content.getDef().getGroupId() ); verify( mainPanelView, times( 1 ) ).setArtifactId( content.getDef().getArtifactId() ); verify( mainPanelView, times( 1 ) ).setVersion( content.getDef().getVersion() ); verify( mainPanelView, times( 1 ) ).setDriverClass( content.getDef().getDriverClass() ); }
@Test public void testEditorChanges() { prepareLoadFileSuccessful(); when( mainPanelView.getName() ).thenReturn( NAME_2 ); when( mainPanelView.getDriverClass() ).thenReturn( DRIVER_CLASS_2 ); when( mainPanelView.getGroupId() ).thenReturn( GROUP_ID_2 ); when( mainPanelView.getArtifactId() ).thenReturn( ARTIFACT_ID_2 ); when( mainPanelView.getVersion() ).thenReturn( VERSION_2 ); mainPanel.onNameChange(); mainPanel.onDriverClassChange(); mainPanel.onGroupIdChange(); mainPanel.onArtifactIdChange(); mainPanel.onVersionChange(); assertEquals( NAME_2, editor.getContent().getDef().getName() ); assertEquals( GROUP_ID_2, editor.getContent().getDef().getGroupId() ); assertEquals( ARTIFACT_ID_2, editor.getContent().getDef().getArtifactId() ); assertEquals( VERSION_2, editor.getContent().getDef().getVersion() ); assertEquals( DRIVER_CLASS_2, editor.getContent().getDef().getDriverClass() ); }