BookBorrowingContentProviderRepository implements BookBorrowingRepository { @Override public void removeBookBorrowing(BookBorrowing bookBorrowing) { final String[] selectionArgs = new String[]{ String.valueOf(bookBorrowing.getId()) }; final String deletionWhere = LendingEntry.COLUMN_LENDING_ID + " = ?"; int rowsDeleted = contentResolver.delete( LendingEntry.CONTENT_URI, deletionWhere, selectionArgs); } @Inject  BookBorrowingContentProviderRepository(ContentResolver contentResolver); @Override List<BookBorrowing> borrowedBooks(); @Override void addBookBorrowing(BookBorrowing bookBorrowing); @Override void removeBookBorrowing(BookBorrowing bookBorrowing);  }
@Test public void testRemoveBookBorrowing() throws Exception { this.bookBorrowingRepository.removeBookBorrowing(this.testBookBorrowing); List<BookBorrowing> borrowedBooks = this.bookBorrowingRepository.borrowedBooks(); assertThat(borrowedBooks.size(), is(0)); }