Class MockJsonService

  • All Implemented Interfaces:
    Service

    public class MockJsonService
    extends JsonService
    Mock implementation of Service that encodes its requests and responses as JSON and looks up responses from a pre-defined map.
    • Field Detail

      • map

        private final java.util.Map<java.lang.String,​java.lang.String> map
    • Constructor Detail

      • MockJsonService

        public MockJsonService​(java.util.Map<java.lang.String,​java.lang.String> map)
    • Method Detail

      • apply

        public java.lang.String apply​(java.lang.String request)
        Description copied from class: JsonService
        Derived class should implement this method to transport requests and responses to and from the peer service.
        Specified by:
        apply in class JsonService