Adapt test to new signatures
Final API: rename aggInternal -> genericInvoke
flatMap generalized to supported collections (public IsViewable)

We had to change flatMap signature and make IsViewable public which is
fine because it's general.