instructions.add(new AddNodeInstructionImpl("/", "a"));
instructions.add(new AddPropertyInstructionImpl("/a", "existed_key1", "value1"));
instructions.add(new AddPropertyInstructionImpl("/a", "existed_key2", "value2"));
instructions.add(new AddPropertyInstructionImpl("/a", "existed_key3", "value3"));
Commit commit = new CommitImpl("/",
"+a : { \"existed_key1\" : \"value1\" , \"existed_key2\" : \"value2\" , \"existed_key3\" : \"value3\" }",
"This is a simple commit", instructions);
CommitCommandMongo command = new CommitCommandMongo(mongoConnection, commit);
String revisionId = command.execute();
instructions = new LinkedList<Instruction>();
instructions.add(new AddNodeInstructionImpl("/", "a"));
instructions.add(new AddPropertyInstructionImpl("/a", "key1", "value1"));
instructions.add(new AddPropertyInstructionImpl("/a", "key2", "value2"));
instructions.add(new AddPropertyInstructionImpl("/a", "key3", "value3"));
commit = new CommitImpl("/",
"+a : { \"key1\" : \"value1\" , \"key2\" : \"value2\" , \"key3\" : \"value3\" }",
"This is a simple commit", instructions);
command = new CommitCommandMongo(mongoConnection, commit);
revisionId = command.execute();