testLayer as a static method on my service, but if I have some tests where I want to have a different behaviour I obviously can't update the testLayer without modifying the behaviour of other tests.class PolicyRepoMockSuccess implement PolicyRepo , class PolicyRepoMockEmptyResponse implement PolicyRepo and so on.mockery lib where I can define the implementation for one of the methods in the test: