UseCaseCall { public void execute() { if (args == null) { args = new Object[0]; } UseCaseParams useCaseParams = new UseCaseParams(useCaseName, args, onSuccessCallback, onErrorCallback); useCaseHandler.execute(useCase, useCaseParams); } UseCaseCall(RosieUseCase useCase, UseCaseHandler useCaseHandler); UseCaseCall useCaseName(String name); UseCaseCall args(Object... args); UseCaseCall onSuccess(OnSuccessCallback onSuccessCallback); UseCaseCall onError(OnErrorCallback errorCallback); void execute();  }
@Test public void shouldExecuteUseCaseUsingTheUseCaseHandler() { RosieUseCase anyUseCase = mock(RosieUseCase.class); UseCaseHandler useCaseHandler = mock(UseCaseHandler.class); UseCaseCall useCaseCall = new UseCaseCall(anyUseCase, useCaseHandler); useCaseCall.execute(); verify(useCaseHandler).execute(eq(anyUseCase), any(UseCaseParams.class)); }