protected boolean isCurrentlyPredicting() {
    return isPredictionOn() && !mWord.isEmpty();
  }
@Test
  public void testDeletesCorrectlyIfPredictingButDelayedPositionUpdate() {
    mAnySoftKeyboardUnderTest.simulateTextTyping("abcd efgh");
    Assert.assertTrue(mAnySoftKeyboardUnderTest.isCurrentlyPredicting());
    mAnySoftKeyboardUnderTest.setUpdateSelectionDelay(500);
    Assert.assertEquals("abcd efgh", mAnySoftKeyboardUnderTest.getCurrentInputConnectionText());
    mAnySoftKeyboardUnderTest.simulateKeyPress(KeyCodes.DELETE, false);
    Assert.assertEquals("abcd efg", mAnySoftKeyboardUnderTest.getCurrentInputConnectionText());
    mAnySoftKeyboardUnderTest.simulateKeyPress(KeyCodes.DELETE, true);
    Assert.assertEquals("abcd ef", mAnySoftKeyboardUnderTest.getCurrentInputConnectionText());
    mAnySoftKeyboardUnderTest.simulateKeyPress(KeyCodes.DELETE, false);
    Assert.assertEquals("abcd e", mAnySoftKeyboardUnderTest.getCurrentInputConnectionText());
    mAnySoftKeyboardUnderTest.simulateKeyPress(KeyCodes.DELETE, true);
    Assert.assertEquals("abcd ", mAnySoftKeyboardUnderTest.getCurrentInputConnectionText());
    mAnySoftKeyboardUnderTest.simulateKeyPress(KeyCodes.DELETE, false);
    Assert.assertEquals("abcd", mAnySoftKeyboardUnderTest.getCurrentInputConnectionText());
    mAnySoftKeyboardUnderTest.simulateKeyPress(KeyCodes.DELETE, true);
    Assert.assertEquals("abc", mAnySoftKeyboardUnderTest.getCurrentInputConnectionText());
    mAnySoftKeyboardUnderTest.simulateKeyPress(KeyCodes.DELETE, false);
    Assert.assertEquals("ab", mAnySoftKeyboardUnderTest.getCurrentInputConnectionText());
    mAnySoftKeyboardUnderTest.simulateKeyPress(KeyCodes.DELETE, true);
    Assert.assertEquals("a", mAnySoftKeyboardUnderTest.getCurrentInputConnectionText());
    mAnySoftKeyboardUnderTest.simulateKeyPress(KeyCodes.DELETE, false);
    Assert.assertEquals("", mAnySoftKeyboardUnderTest.getCurrentInputConnectionText());
    // extra
    mAnySoftKeyboardUnderTest.simulateKeyPress(KeyCodes.DELETE, true);
    Assert.assertEquals("", mAnySoftKeyboardUnderTest.getCurrentInputConnectionText());
  }