use of com.unboundid.ldap.sdk.TestIntermediateResponseListener in project ldapsdk by pingidentity.
the class GetChangelogBatchExtendedRequestTestCase method testSendRequestWithAlternateIntermediateResponseListener.
/**
* Provides test coverage for an attempt to send a request to the server and
* retrieve a result for a case in which no entry listener is in use but the
* request has a custom intermediate response listener.
* <BR><BR>
* Access to a Directory Server instance is required for complete processing.
*
* @throws Exception If an unexpected problem occurs.
*/
@Test()
public void testSendRequestWithAlternateIntermediateResponseListener() throws Exception {
if (!isDirectoryInstanceAvailable()) {
return;
}
final LDAPConnection conn = getAdminConnection();
final GetChangelogBatchExtendedRequest request = new GetChangelogBatchExtendedRequest(new EndOfChangelogStartingPoint(), 0, 0L);
request.setIntermediateResponseListener(new TestIntermediateResponseListener());
try {
conn.processExtendedOperation(request);
fail("Expected an exception when trying to process a request with a " + "custom intermediate response listener.");
} catch (final LDAPException le) {
// This was expected.
} finally {
conn.close();
}
}
Aggregations