@Override
    public void actionPerformed(ActionEvent e) {
        if (BmTestManager.getInstance().getTestInfo().getId().isEmpty()) {
            JMeterUtils.reportErrorToUser("JMX can not be downloaded: test id is empty", "Empty test id");
            return;
        }
        GuiPackage guiPackage = GuiPackage.getInstance();
        if (guiPackage.isDirty()) {

            int chosenOption = JOptionPane.showConfirmDialog(GuiPackage.getInstance().getMainFrame(),
                    "Do you want to save changes in current test-plan?",
                    JMeterUtils.getResString("save?"),
                    JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE);

            if (chosenOption == JOptionPane.CANCEL_OPTION) {
                return;
            } else if (chosenOption == JOptionPane.YES_OPTION) {

                Utils.saveJMX();


                Utils.downloadJMX();
            } else if (chosenOption == JOptionPane.NO_OPTION) {
                Utils.downloadJMX();
            }
        } else {
            Utils.downloadJMX();
        }
    }