Unit testing functional interface

Viewed 5432

I have a public method like this:

public List<Resource> getResource(Function<InputStream, List<Resource>> funcToExecute)
{
    InputStream inp = getInputStream();
    return funcToExecute.apply(inp);
}

How do I unit test this functionality? How do I establish relation between inputstream and list of resource to be returned in my Unit tests?

1 Answers
Related