RepoViewModel extends BaseObservable { public void setRepository(Repository repository) { this.repository = repository; notifyChange(); } RepoViewModel(Repository repository); void setRepository(Repository repository); String getRepoTitle(); String getRepoDescription(); String getWatchers(); String getStars(); String getForks();  }
@Test public void testSetRepository() throws Exception { mockRepository.setName("NewName"); repoViewModel.setRepository(mockRepository); Assert.assertEquals("NewName", repoViewModel.getRepoTitle()); }