@Test
public void testExplicitPatchCreationMixed()
{
PatchTree patch = new PatchTree();
patch.addOperation(new PathSpec("foo"), PatchOpFactory.setFieldOp(42));
patch.addOperation(new PathSpec("bar", "baz"), PatchOpFactory.REMOVE_FIELD_OP);
patch.addOperation(new PathSpec("qux"), PatchOpFactory.REMOVE_FIELD_OP);
Assert.assertEquals(patch.toString(), "{$set={foo=42}, bar={$delete=[baz]}, $delete=[qux]}");
}