Class MockRestClient
java.lang.Object
org.sourcelab.kafka.connect.apiclient.rest.MockRestClient
- All Implemented Interfaces:
RestClient
A Mock Rest Client for testing.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Called to release any internally held resources.voidinit(Configuration configuration) Initializes the RestClient implementation.submitRequest(Request request) Make a request against the Pardot API.
-
Constructor Details
-
MockRestClient
public MockRestClient()
-
-
Method Details
-
init
Description copied from interface:RestClientInitializes the RestClient implementation. Any setup or resource allocation should happen here.- Specified by:
initin interfaceRestClient- Parameters:
configuration- Pardot Api Configuration.
-
submitRequest
Description copied from interface:RestClientMake a request against the Pardot API.- Specified by:
submitRequestin interfaceRestClient- Parameters:
request- The request to submit.- Returns:
- The response, in UTF-8 String format.
- Throws:
RestException- When something goes wrong in an underlying implementation.
-
close
public void close()Description copied from interface:RestClientCalled to release any internally held resources.- Specified by:
closein interfaceRestClient
-