GetTrainingData implements UseCase { public GetTrainingData(UseCaseCallback<FederatedRepository> useCaseCallback, FederatedRepository repository) { this.useCaseCallback = useCaseCallback; this.repository = repository; } GetTrainingData(UseCaseCallback<FederatedRepository> useCaseCallback,
                           FederatedRepository repository); @Override void execute();  }
@Test public void testGetTrainingData() { FederatedDataSource dataSource = Mockito.mock(FederatedDataSource.class); FederatedRepository repository = Mockito.mock(FederatedRepository.class); given(dataSource.getTrainingData()).willReturn(dataSet); given(repository.getTrainingData()).willReturn(dataSet); GetTrainingData cut = new GetTrainingData(useCaseCallback, repository); cut.execute(); Mockito.verify(repository).getTrainingData(); Mockito.verify(useCaseCallback).onSuccess(repository); }