POMEditorPanel implements POMEditorPanelView.Presenter,
                   IsWidget { public void setPOM(POM model, boolean isReadOnly) { if (isReadOnly) { view.setReadOnly(); } this.model = model; gavPreferences.load(projectScopedResolutionStrategySupplier.get(), loadedGAVPreferences -> { view.setName(model.getName()); view.setDescription(model.getDescription()); view.enableGroupID(); view.enableArtifactID(); view.enableVersion(); if (model.hasParent()) { view.setParentGAV(model.getParent()); view.showParentGAV(); if (!loadedGAVPreferences.isChildGAVEditEnabled()) { view.disableGroupID(""); view.disableVersion(""); } } else { view.hideParentGAV(); } view.setGAV(model.getGav()); view.addArtifactIdChangeHandler(POMEditorPanel.this::setTitle); setTitle(model.getGav().getArtifactId()); }, throwable -> { throw new RuntimeException(throwable); }); } POMEditorPanel(); @Inject  POMEditorPanel(final POMEditorPanelView view,
                          final SyncBeanManager iocManager,
                          final GAVPreferences gavPreferences,
                          final ProjectScopedResolutionStrategySupplier projectScopedResolutionStrategySupplier); void setPOM(POM model,
                       boolean isReadOnly); void setArtifactID(final String artifactID); @Override void addNameChangeHandler(final NameChangeHandler changeHandler); @Override void addGroupIdChangeHandler(final GroupIdChangeHandler changeHandler); @Override void addArtifactIdChangeHandler(final ArtifactIdChangeHandler changeHandler); @Override void addVersionChangeHandler(final VersionChangeHandler changeHandler); @Override void onNameChange(final String name); @Override void onDescriptionChange(final String description); @Override void onOpenProjectContext(); @Override Widget asWidget(); @Override void disableGroupID(final String reason); @Override void disableVersion(final String reason); @Override POM getPom(); @Override void setValidName(final boolean isValid); @Override void setValidGroupID(final boolean isValid); @Override void setValidArtifactID(final boolean isValid); @Override void setValidVersion(final boolean isValid);  }
@Test public void testLoadSingleModule() throws Exception { POM gavModel = createTestModel("pomName", "pomDescription", "pomUrl", "group", "artifact", "1.1.1"); panel.setPOM(gavModel, false); verify(view).setName("pomName"); verify(view).setDescription("pomDescription"); verify(view).enableGroupID(); verify(view).enableArtifactID(); verify(view).enableVersion(); verify(view).hideParentGAV(); }