@Test
public void mergeTest() {

    // Setup:
    JSONArray adds = new JSONArray();
    adds.add(new JSONObject().element("@id", "http://example.com/add").element("@type", new JSONArray().element("http://example.com/Add")));
    JSONArray deletes = new JSONArray();
    deletes.add(new JSONObject().element("@id", "http://example.com/delete").element("@type", new JSONArray().element("http://example.com/Delete")));
    FormDataMultiPart fd = new FormDataMultiPart();
    fd.field("additions", adds.toString());
    fd.field("deletions", deletes.toString());
    Response response = target().path("catalogs/" + encode(LOCAL_IRI) + "/records/" + encode(RECORD_IRI)
            + "/branches/" + encode(BRANCH_IRI) + "/conflicts/resolution")
            .queryParam("targetId", BRANCH_IRI).request().post(Entity.entity(fd, MediaType.MULTIPART_FORM_DATA));
    assertEquals(response.getStatus(), 200);
    assertEquals(response.readEntity(String.class), COMMIT_IRIS[0]);
    verify(versioningManager).merge(eq(vf.createIRI(LOCAL_IRI)), eq(vf.createIRI(RECORD_IRI)), eq(vf.createIRI(BRANCH_IRI)), eq(vf.createIRI(BRANCH_IRI)), any(User.class), any(Model.class), any(Model.class));
}