* @author Alex Ruiz
*/
public class JListMatchingItemQuery_matchingItemIndices_Test extends JListMatchingItemQuery_TestCase {
@Test
public void should_return_indices_of_matching_items() {
TextMatcher matcher = mockTextMatcher();
when(matcher.isMatching("Yoda")).thenReturn(false);
when(matcher.isMatching("Luke")).thenReturn(true);
List<Integer> indices = JListMatchingItemQuery.matchingItemIndices(list, matcher, cellReader);
assertThat(indices).hasSize(1).containsOnly(1);
}