UserDetailsViewModel { public void loadRepositories(String username) { showProgressIndicator(true); loadUserDetailsUseCase.execute(new LoadRepositoriesSubscriber(), username); } @Inject  UserDetailsViewModel(@Named("userDetails") UseCase loadUserDetailsUseCase); void setFragmentListener(FragmentListener fragmentListener); void loadRepositories(String username); void destroy(Boolean unsubscribe); ObservableInt getProgressVisibility(); ObservableInt getRepoListVisibility(); final ObservableInt progressVisibility; final ObservableInt repoListVisibility; }
@Test public void loadRepositoriesShouldLoadUserRepositoriesFromUseCase() { userDetailsViewModel.loadRepositories(MockFactory.TEST_USERNAME); verify(mockLoadUserDetailsUseCase).execute(any(DefaultSubscriber.class), eq(MockFactory.TEST_USERNAME)); }