@Test public void testSerialization() throws JsonProcessingException { Row row = new Row().stringColumn("name", "ls1") .stringColumn("description", "first logical switch"); Insert insert = new Insert("Logical_Switch", row).withUuidName("insert_ls1"); String expectedResult = "{\"op\":\"insert\",\"table\":\"Logical_Switch\"," + "\"row\":{\"name\":\"ls1\",\"description\":\"first logical" + " switch\"}," + "\"uuid-name\":\"insert_ls1\"}"; assertEquals(expectedResult, JsonUtil.serialize(insert)); }
public Insert withUuidName(String uuidName) { this.uuidName = uuidName; return this; }
Insert extends Operation { public Insert withUuidName(String uuidName) { this.uuidName = uuidName; return this; } }
Insert extends Operation { public Insert withUuidName(String uuidName) { this.uuidName = uuidName; return this; } Insert(String table, Row row);  Insert(String table, Row row, String uuidName); }
Insert extends Operation { public Insert withUuidName(String uuidName) { this.uuidName = uuidName; return this; } Insert(String table, Row row);  Insert(String table, Row row, String uuidName); Insert withUuidName(String uuidName); String getTable(); Row getRow(); String getUuidName(); @Override boolean equals(Object other); @Override int hashCode(); @Override String toString(); }
Insert extends Operation { public Insert withUuidName(String uuidName) { this.uuidName = uuidName; return this; } Insert(String table, Row row);  Insert(String table, Row row, String uuidName); Insert withUuidName(String uuidName); String getTable(); Row getRow(); String getUuidName(); @Override boolean equals(Object other); @Override int hashCode(); @Override String toString();  }