### Question:
LdapConnection implements Closeable { public CompareResult compare(CompareRequest request) throws LdapException { addTransactionIdControl(request); return connection.compare(request); } LdapConnection(final Connection connection);   LdapConnection(final Connection connection, final TransactionId rootTransactionId); Result add(AddRequest request); Result add(Entry entry); Result add(String... ldifLines); BindResult bind(BindRequest request); BindResult bind(String name, char[] password); @Override void close(); CompareResult compare(CompareRequest request); CompareResult compare(String name, String attributeDescription, String assertionValue); Result delete(DeleteRequest request); Result delete(String name); Result deleteSubtree(String name); Result modify(ModifyRequest request); Result modify(String... ldifLines); Result modifyDN(ModifyDNRequest request); Result modifyDN(String name, String newRDN); SearchResultEntry readEntry(DN name, String... attributeDescriptions); SearchResultEntry readEntry(String name, String... attributeDescriptions); ConnectionEntryReader search(SearchRequest request); Result search(SearchRequest request, Collection<? super SearchResultEntry> entries); Result search(SearchRequest request, Collection<? super SearchResultEntry> entries,
                         Collection<? super SearchResultReference> references); ConnectionEntryReader search(String baseObject, SearchScope scope, String filter,
                                        String... attributeDescriptions); SearchResultEntry searchSingleEntry(SearchRequest request); SearchResultEntry searchSingleEntry(String baseObject, SearchScope scope, String filter,
                                               String... attributeDescriptions);  }### Answer:
@Test public void shouldUseTransactionIdControlInCompareRequest() throws Exception { CompareRequest compareRequest = Requests.newCompareRequest("dc=example,dc=com", "user", "user.0"); ldapConnection.compare(compareRequest); assertLdapRequest(compareRequest); }