@Override
    public void actionPerformed(ActionEvent e) {
        int dialogButton;
        BmTestManager bmTestManager = BmTestManager.getInstance();
        if ("start".equals(e.getActionCommand().toLowerCase())) {
            if (bmTestManager.getUserKey().isEmpty()) {
                JMeterUtils.reportErrorToUser("Please, set up user key.", "User key is not set.");
                return;
            }
            dialogButton = JOptionPane.showConfirmDialog(TestPanel.getTestPanel().getMainPanel(), "Are you sure that you want to start the test?",
                    "Start test?",
                    JOptionPane.YES_NO_OPTION);
            if (dialogButton == JOptionPane.YES_OPTION) {
                GuiUtils.startInTheCloud(cloudPanel.getNumberOfUsersSlider(),
                        cloudPanel.getDurationSpinner(),
                        cloudPanel.getIterationsSpinner(),
                        cloudPanel.getRampupSpinner());
            }
        } else {
            dialogButton = JOptionPane.showConfirmDialog(TestPanel.getTestPanel().getMainPanel(), "Are you sure that you want to stop the test? ",
                    "Stop test?",
                    JOptionPane.YES_NO_OPTION);
            if (dialogButton == JOptionPane.YES_OPTION) {
                BmTestManager.getInstance().stopTest();
            }
        }
    }