@Override
  @NonNull public Iterable<String> getNextWords(
      @NonNull String currentWord, int maxResults, int minWordUsage) {
    if (mNextNameParts.containsKey(currentWord)) {
      return Arrays.asList(mNextNameParts.get(currentWord));
    } else {
      return Collections.emptyList();
    }
  }
@Test
  public void testRegisterObserver() throws Exception {
    ShadowContentResolver shadowContentResolver =
        Shadows.shadowOf(getApplicationContext().getContentResolver());
    final Collection<ContentObserver> contentObservers =
        shadowContentResolver.getContentObservers(ContactsContract.Contacts.CONTENT_URI);
    Assert.assertEquals(1, contentObservers.size());

    // now, simulating contacts update
    mProvider.addRow(10, "Hagar Even-Danan", true, 10);
    TestRxSchedulers.drainAllTasks();

    Iterator<String> nextWords = mDictionaryUnderTest.getNextWords("Hagar", 2, 1).iterator();
    Assert.assertTrue(nextWords.hasNext());
    Assert.assertEquals("Even-Danan", nextWords.next());
    Assert.assertFalse(nextWords.hasNext());
  }