public List < Invocation > find ( List < ? > mocks ) { List < Invocation > unused = new LinkedList < Invocation > ( ) ; for ( Object mock : mocks ) { List < Stubbing > fromSingleMock = MockUtil . getInvocationContainer ( mock ) . getStubbingsDescending ( ) ; for ( Stubbing s : fromSingleMock ) { if ( ! s . wasUsed ( ) ) { unused . add ( s . getInvocation ( ) ) ; } } } return unused ; }
Finds all unused stubs for given mocks