Indicates a mock field or mock parameter whose mocked
type/instance will produce
mocked instances as non-
methods get called.
So, whenever a mocked method is invoked on a cascading mocked type/instance, a cascaded
mocked instance will
be automatically returned instead of
, provided the return type of the method is of an allowed reference
Further invocations can then be made on cascaded instances, with the cascading process repeating itself as needed.
, primitive wrappers, or collection types are not
considered for cascading.
In a test having a cascading mocked type, a separate non-cascading mocked type can be declared so that expectations
on intermediate cascaded instances can be recorded/verified.