@Test public void testDeleteStudent() { String studentToDelete = "German"; viewModel.deleteStudent(studentToDelete); Mockito.verify(repository).deleteStudent(studentToDelete); }
void deleteStudent(@NonNull String student) { repository.deleteStudent(student); }
MainActivityViewModel extends ViewModel { void deleteStudent(@NonNull String student) { repository.deleteStudent(student); } }
MainActivityViewModel extends ViewModel { void deleteStudent(@NonNull String student) { repository.deleteStudent(student); } MainActivityViewModel(@NonNull Repository repository); }
MainActivityViewModel extends ViewModel { void deleteStudent(@NonNull String student) { repository.deleteStudent(student); } MainActivityViewModel(@NonNull Repository repository);  }
MainActivityViewModel extends ViewModel { void deleteStudent(@NonNull String student) { repository.deleteStudent(student); } MainActivityViewModel(@NonNull Repository repository);   }