AddViewModel extends WatchLaterViewModel implements AccountRepository.TokenCallback, YoutubeRepository.AddVideoCallback,
        YoutubeRepository.VideoInfoCallback { public void setVideoUri(Uri uri) { videoId = videoIdParser.parseVideoId(uri); youtubeRepository.getVideoInfo(videoId, this); } @SuppressWarnings("WeakerAccess")  AddViewModel(WatchLaterApplication application); LiveData<Account> getAccount(); void setAccount(Account account); void setVideoUri(Uri uri); LiveData<VideoInfo> getVideoInfo(); LiveData<VideoAdd> getVideoAdd(); LiveData<Boolean> getPermissionNeeded(); void setPermissionNeeded(boolean needsPermission); void watchLater(); @Override void onToken(boolean hasError, String token, Intent intent); @Override void onAddResult(YoutubeRepository.ErrorType errorType, String token); @Override void onVideoInfoResult(YoutubeRepository.ErrorType errorType, YoutubeRepository.Videos.Item item);  }
@Test public void should_set_uri() { Uri uri = mock(Uri.class); when(videoIdParser.parseVideoId(uri)).thenReturn("test"); viewModel.setVideoUri(uri); }