func list(count int, rv string) *metainternalversion.List { … } type testPager … func (p *testPager) reset() { … } func (p *testPager) PagedList(ctx context.Context, options metav1.ListOptions) (runtime.Object, error) { … } func (p *testPager) ExpiresOnSecondPage(ctx context.Context, options metav1.ListOptions) (runtime.Object, error) { … } func (p *testPager) ExpiresOnSecondPageThenFullList(ctx context.Context, options metav1.ListOptions) (runtime.Object, error) { … } func TestListPager_List(t *testing.T) { … } func TestListPager_EachListItem(t *testing.T) { … } func TestListPager_eachListPageBuffered(t *testing.T) { … }