Class MockRestClient

java.lang.Object
org.sourcelab.kafka.connect.apiclient.rest.MockRestClient
All Implemented Interfaces:
RestClient

public class MockRestClient extends Object implements RestClient
A Mock Rest Client for testing.
  • Constructor Details

    • MockRestClient

      public MockRestClient()
  • Method Details

    • init

      public void init(Configuration configuration)
      Description copied from interface: RestClient
      Initializes the RestClient implementation. Any setup or resource allocation should happen here.
      Specified by:
      init in interface RestClient
      Parameters:
      configuration - Pardot Api Configuration.
    • submitRequest

      public RestResponse submitRequest(Request request) throws RestException
      Description copied from interface: RestClient
      Make a request against the Pardot API.
      Specified by:
      submitRequest in interface RestClient
      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: RestClient
      Called to release any internally held resources.
      Specified by:
      close in interface RestClient