@Test
public void testToJsonObject() throws JSONException, InvalidMapBoxStyleException {

    String name1 = "test";
    JSONObject object1 = new JSONObject();
    object1.put(DataSourceConfig.KEY_NAME, name1);
    DataSourceConfig config1 = new DataSourceConfig(object1);
    // Assert that the resultant JSONObject is similar to what was passed in the constructor
    Assert.assertEquals(object1.toString(), config1.toJsonObject().toString());
    // Make sure the churned out JSONObject doesn't refer the same object passed in the constructor
    Assert.assertNotSame(object1, config1.toJsonObject());
}