Solved the problem with mocks and stubs.