1 /* 2 * Copyright (c) 2007 Mockito contributors 3 * This program is made available under the terms of the MIT License. 4 */ 5 6 package org.mockito.internal.invocation.finder; 7 8 import org.mockito.internal.util.collections.ListUtil; 9 import org.mockito.invocation.Invocation; 10 11 import java.util.List; 12 13 /** 14 * Author: Szczepan Faber, created at: 4/3/11 15 */ 16 public class VerifiableInvocationsFinder { 17 find(List<?> mocks)18 public List<Invocation> find(List<?> mocks) { 19 List<Invocation> invocations = new AllInvocationsFinder().find(mocks); 20 return ListUtil.filter(invocations, new RemoveIgnoredForVerification()); 21 } 22 23 static class RemoveIgnoredForVerification implements ListUtil.Filter<Invocation>{ isOut(Invocation i)24 public boolean isOut(Invocation i) { 25 return i.isIgnoredForVerification(); 26 } 27 } 28 } 29