package kg.apc.jmeter.config;

import org.junit.Test;

import static org.junit.Assert.assertEquals;

public class ServersListPanelTest {
    @Test
    public void testClear() {
        ServersListPanel obj = new ServersListPanel();
        assertEquals(0, obj.getCount());
        obj.add("Test");
        assertEquals(1, obj.getCount());
        obj.clear();
        assertEquals(0, obj.getCount());
    }

    @Test
    public void testSaveToTestElement() {
        DistributedTestControl te = new DistributedTestControl();
        ServersListPanel obj1 = new ServersListPanel();
        obj1.add("Test");
        obj1.saveToTestElement(te);
        ServersListPanel obj2 = new ServersListPanel();
        assertEquals(0, obj2.getCount());
        obj2.loadFromTestElement(te);
        assertEquals(1, obj2.getCount());
    }
}

@@ -35,106 +35,322 @@
 ort 
-org.junit.Test;%0A%0Aimport static org.junit.Assert.assertEquals;%0A%0Apublic class ServersListPanelTest %7B
+kg.apc.emulators.TestJMeterUtils;%0Aimport org.junit.BeforeClass;%0Aimport org.junit.Test;%0A%0Aimport javax.swing.*;%0A%0Aimport static org.junit.Assert.assertEquals;%0A%0Apublic class ServersListPanelTest %7B%0A    @BeforeClass%0A    public static void setUpClass() throws Exception %7B%0A        TestJMeterUtils.createJmeterEnv();%0A    %7D%0A
 %0A   
@@ -433,32 +433,63 @@
 ersListPanel();%0A
+        new JPanel().add(obj);%0A
         assertEq
@@ -814,32 +814,64 @@
 ersListPanel();%0A
+        new JPanel().add(obj1);%0A
         obj1.add
@@ -964,32 +964,64 @@
 ersListPanel();%0A
+        new JPanel().add(obj2);%0A
         assertEq

Fix unit tests