@Test
  public void shouldEnableChangeButtonIfValueNotEmpty() throws Exception {
    when(view.getValue()).thenReturn(VAR_VALUE);

    presenter.onVariableValueChanged();

    verify(view).setEnableChangeButton(eq(!DISABLE_BUTTON));
  }
  @Test
  public void shouldDisableChangeButtonIfNoValue() throws Exception {
    when(view.getValue()).thenReturn(EMPTY_VALUE);

    presenter.onVariableValueChanged();

    verify(view).setEnableChangeButton(eq(DISABLE_BUTTON));
  }
  @Test
  public void testChangeValueRequest() throws Exception {
    when(debuggerManager.getActiveDebugger()).thenReturn(debugger);
    when(view.getValue()).thenReturn(VAR_VALUE);
    when(debuggerVariable.getVariablePath()).thenReturn(variablePath);
    when(variablePath.getPath()).thenReturn(new ArrayList<>());

    presenter.onChangeClicked();

    verify(debugger).changeVariableValue(anyObject(), anyString());
    verify(view).close();
  }
  @Test
  public void shouldShowDialog() throws Exception {
    when(debuggerPresenter.getSelectedVariable()).thenReturn(debuggerVariable);
    when(debuggerVariable.getValue()).thenReturn(VAR_VALUE);

    presenter.showDialog();

    verify(debuggerPresenter).getSelectedVariable();
    verify(view).setValueTitle(constants.changeValueViewExpressionFieldTitle(VAR_NAME));
    verify(view).setValue(VAR_VALUE);
    verify(view).focusInValueField();
    verify(view).selectAllText();
    verify(view).setEnableChangeButton(eq(DISABLE_BUTTON));
    verify(view).showDialog();
  }
  @Test
  public void shouldCloseDialogOnCancelClicked() throws Exception {
    presenter.onCancelClicked();

    verify(view).close();
  }