Class MockRegistry


  • public class MockRegistry
    extends java.lang.Object
    Provides thread local registry for mock HTTP request/response pairs and service/result object pairs. These are used in Fluent tests to mock up calls to external and internal services.
    Since:
    5.1.7
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void clear()
      Clear registries.
      static java.util.Map<java.lang.Object,​java.lang.Object> getRegistry()
      Get the mock object registry.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getRegistry

        public static java.util.Map<java.lang.Object,​java.lang.Object> getRegistry()
        Get the mock object registry.
        Returns:
        the service registry
      • clear

        public static void clear()
        Clear registries. This is important to avoid polluting non-test code paths.