@Before
  public void setUp() {
    when(fileTypeRegistry.getFileTypeByFile(file)).thenReturn(fileType);
    when(fileTypeRegistry.getFileTypeByFile(newFileNode)).thenReturn(fileType);
    when(fileTypeRegistry.getFileTypeByFile(fileNode2)).thenReturn(fileType);
    when(editorRegistry.getEditor(fileType)).thenReturn(editorProvider);
    when(editorProvider.getEditor()).thenReturn(editor);
    when(file.getPath()).thenReturn(PATH);
    when(newFileNode.getPath()).thenReturn(NEW_PATH);

    when(editor.getEditorInput()).thenReturn(editorInput);
    when(editorInput.getFile()).thenReturn(file);

    editorAgent =
        new EditorAgentImpl(
            eventBus,
            fileTypeRegistry,
            editorRegistry,
            workspace,
            notificationManager,
            coreLocalizationConstant,
            nodeManager,
            projectServiceClient,
            appContext,
            dtoUnmarshallerFactory);
  }
  @Before
  public void setUp() {
    when(appContext.getCurrentProject()).thenReturn(currentProject);

    when(environment.getScope()).thenReturn(SYSTEM);
    when(environment.getPath()).thenReturn(TEXT);
    when(environment.getName()).thenReturn(TEXT);
    when(environment.getType()).thenReturn(TEXT);
    when(environment.getRam()).thenReturn(MB_500.getValue());

    when(currentProject.getCurrentTree()).thenReturn(treeStructure);
    when(currentProject.getProjectDescription()).thenReturn(descriptor);

    when(fileTypeRegistry.getFileTypeByFile(file)).thenReturn(fileType);
    when(editorProvider.getEditor()).thenReturn(editor);

    when(editor.getEditorInput()).thenReturn(editorInput);
    when(editorInput.getFile()).thenReturn(file);

    presenter = new DummyPanelProperties(view, appContext);
  }