@Test
    public void convertToJSON() {
        Properties props = new Properties();
        try {
            props.load(new FileInputStream(TestConstants.RESOURCES + "/jmeter.properties"));
            JSONObject expected = Utils.convertToJSON(props);
            String s = Utils.getFileContents(TestConstants.RESOURCES + "/jmeter.properties.json");
            JSONObject actual = new JSONObject(s);

            Iterator<String> i = actual.keys();
            StringBuilder k = new StringBuilder();
            while (i.hasNext()) {
                k.append(i.next());
                Assert.assertTrue(actual.get(k.toString()).equals(expected.get(k.toString())));
                k.setLength(0);
            }
        } catch (JSONException je) {
            System.out.println("Failed to convert properties to JSON..." + je);
            Assert.fail();
        } catch (FileNotFoundException fnfe) {
            System.out.println("Failed to read jmeter.properties..." + fnfe);
            Assert.fail();
        } catch (IOException ioe) {
            System.out.println("Failed to read jmeter.properties..." + ioe);
            Assert.fail();
        }
    }