Mocking a method which returns Page interface

Viewed 31977

I have a method which I need to write unit test case. The method returns a Page type.

How can I mock this method?

Method:

public Page<Company> findAllCompany( final Pageable pageable )
{
    return companyRepository.findAllByIsActiveTrue(pageable);
}

Thanks for the help

1 Answers
Related