@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); }