@Test
public void testCreateGraph() {

    String graphId = "";
    try {
        JSONObject meta = new JSONObject();
        meta.put("orig_meta", 4);
        graphId = lg.createGraph(meta);
    }
    catch (Exception e) {
        fail("Unable to create new graph in LEMONGRAPH");
    }
    try {
        UUID toUuid = UUID.fromString(graphId);
        assertEquals(toUuid.toString(), graphId);
    } catch (IllegalArgumentException e) {
        fail("Invalid graph id in testCreateGraph");
    }
    // Try Querying Graph
    try {
        JSONObject results2 = lg.getGraph(graphId);
        JSONObject meta = results2.getJSONObject("meta");
        if (meta.has("orig_meta")) {
            int v = meta.getInt("orig_meta");
            assertEquals(v,4);
        }
    } catch (InvalidGraphException e) {
        fail("ERROR getting the graph " + graphId + " " + e.getMessage());
    }
    // Delete graph
    try {
        lg.deleteGraph(graphId);
    } catch (Exception e) {
        fail("Unable to delete graph from LemonGraph " + e.getMessage());
    }
    // Make sure it's really deleted
    try {
        JSONObject deleteCheck = lg.getGraph(graphId);
        fail("Graph delete failed!");
    } catch (InvalidGraphException e) {
    }
}