Package: groovy.mock.interceptor

## [Groovy] Class Demand

- groovy.mock.interceptor.Demand

-     class Demand
      extends Object

  The object that registers method calls on it for the use with Mocks and Stubs. For each call a CallSpec object is added to the recorded list.

- - ### Properties Summary

    Properties
    Type | Name and description
    --- | ---
    `Map` | `ignore` Filters for ignored methods mapped to their optional replacement behavior.
    `List` | `recorded` Recorded method expectations in declaration order.

  - ### Constructor Summary

    Constructors
    Constructor and description
    `Demand()`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `Object` | `invokeMethod(String methodName, Object args)` Records an expected method call together with its cardinality and behavior.
    `` | `Object` | `verify(List calls)` Verifies that the recorded call counts satisfy all declared demand ranges.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Property Detail

    - #### Map ignore

      Filters for ignored methods mapped to their optional replacement behavior.

    - #### List recorded

      Recorded method expectations in declaration order.

  - ### Constructor Detail

    - #### Demand()

  - ### Method Detail

    - #### Object invokeMethod(String methodName, Object args)

      Records an expected method call together with its cardinality and behavior.

      Parameters:
        `methodName` - the demanded method name
        `args` - the optional cardinality and required behavior closure
      Returns:
        `null`

    - #### Object verify(List calls)

      Verifies that the recorded call counts satisfy all declared demand ranges.

      Parameters:
        `calls` - the observed call counts aligned with recorded