public static void toJson(KeyValue obj, java.util.Map<String, Object> json) { json.put("createIndex", obj.getCreateIndex()); json.put("flags", obj.getFlags()); if (obj.getKey() != null) { json.put("key", obj.getKey()); } json.put("lockIndex", obj.getLockIndex()); json.put("modifyIndex", obj.getModifyIndex()); if (obj.getSession() != null) { json.put("session", obj.getSession()); } if (obj.getValue() != null) { json.put("value", obj.getValue()); } } }
private void checkKeyValue(KeyValue expected, KeyValue actual) { assertEquals(expected, actual); assertEquals(expected.hashCode(), actual.hashCode()); assertEquals(expected.getKey(), actual.getKey()); assertEquals(expected.getValue(), actual.getValue()); assertEquals(expected.getSession(), actual.getSession()); assertEquals(expected.getCreateIndex(), actual.getCreateIndex()); assertEquals(expected.getFlags(), actual.getFlags()); assertEquals(expected.getModifyIndex(), actual.getModifyIndex()); assertEquals(expected.getLockIndex(), actual.getLockIndex()); }