private void deleteWord(String word) {
    mCurrentDictionary.deleteWord(word);
  }
@Test
  public void testDeleteWord() {
    // adding a few words to the dictionary
    UserDictionary userDictionary = new UserDictionary(getApplicationContext(), "en");
    userDictionary.loadDictionary();
    userDictionary.addWord("hello", 1);
    userDictionary.addWord("you", 2);
    userDictionary.close();

    UserDictionaryEditorFragment fragment = startEditorFragment();
    TestRxSchedulers.drainAllTasks();

    RecyclerView wordsRecyclerView = fragment.getView().findViewById(R.id.words_recycler_view);
    // http://stackoverflow.com/questions/27052866/android-robolectric-click-recyclerview-item
    wordsRecyclerView.measure(0, 0);
    wordsRecyclerView.layout(0, 0, 100, 10000);

    Assert.assertEquals(
        3 /*two words, and one AddNew*/, wordsRecyclerView.getAdapter().getItemCount());
    View helloRowView = wordsRecyclerView.findViewHolderForAdapterPosition(0).itemView;
    Assert.assertNotNull(helloRowView);
    View deleteButtonView = helloRowView.findViewById(R.id.delete_user_word);
    Assert.assertNotNull(deleteButtonView);
    TextView helloTextView = helloRowView.findViewById(R.id.word_view);
    Assert.assertNotNull(helloTextView);
    Assert.assertEquals("hello", helloTextView.getText().toString());
    // deleting word
    Shadows.shadowOf(deleteButtonView).getOnClickListener().onClick(deleteButtonView);
    TestRxSchedulers.drainAllTasks();

    Assert.assertEquals(2, wordsRecyclerView.getAdapter().getItemCount());
  }