### Question:
AAITransactionalClient extends
        GraphInventoryTransactionClient<AAITransactionalClient, AAIBaseResourceUri<?, ?>, AAIResourceUri, AAIEdgeLabel> { protected Transactions getTransactions() { return this.transactions; } protected  AAITransactionalClient(AAIResourcesClient resourcesClient, AAIClient aaiClient); AAITransactionalClient beginNewTransaction(); @Override void execute(); @Override void execute(boolean dryRun);  }### Answer:
@Test public void testCreate() throws IOException { final Relationship body = new Relationship(); body.setRelatedLink(uriB.build().toString()); AAITransactionalClient transactions = aaiClient.beginTransaction().create(uriA.clone().relationshipAPI(), body); String serializedTransactions = mapper.writeValueAsString(transactions.getTransactions()); Map<String, Object> actual = mapper.readValue(serializedTransactions, new TypeReference<Map<String, Object>>() {}); Map<String, Object> expected = mapper.readValue(getJson("test-request-small.json"), new TypeReference<Map<String, Object>>() {}); assertEquals(actual, expected); }
@Test public void testDisconnect() throws IOException { List<AAIResourceUri> uris = new ArrayList<>(); uris.add(uriB); AAITransactionalClient transactions = aaiClient.beginTransaction().disconnect(uriA, uris); String serializedTransactions = mapper.writeValueAsString(transactions.getTransactions()); Map<String, Object> actual = mapper.readValue(serializedTransactions, new TypeReference<Map<String, Object>>() {}); Map<String, Object> expected = mapper.readValue(getJson("test-request-small.json").replace("put", "delete"), new TypeReference<Map<String, Object>>() {}); assertEquals(actual, expected); }
@Test public void testUpdate() throws IOException { final Relationship body = new Relationship(); body.setRelatedLink(uriB.build().toString()); AAIResourceUri uriAClone = uriA.clone().relationshipAPI(); AAITransactionalClient transactions = aaiClient.beginTransaction().update(uriAClone, body); String serializedTransactions = mapper.writeValueAsString(transactions.getTransactions()); Map<String, Object> actual = mapper.readValue(serializedTransactions, new TypeReference<Map<String, Object>>() {}); Map<String, Object> expected = mapper.readValue(getJson("test-request-small.json").replace("put", "patch"), new TypeReference<Map<String, Object>>() {}); assertEquals(actual, expected); }