public void setOnKeyboardActionListener(OnKeyboardActionListener keyboardActionListener) {
    mKeyboardActionListener = keyboardActionListener;
    for (int childIndex = 0; childIndex < getChildCount(); childIndex++) {
      View child = getChildAt(childIndex);
      if (child instanceof InputViewActionsProvider) {
        ((InputViewActionsProvider) child).setOnKeyboardActionListener(keyboardActionListener);
      }
    }
  }
@Test
  public void testSetOnKeyboardActionListener() {
    AnyKeyboardView mock1 = Mockito.mock(AnyKeyboardView.class);
    AnyKeyboardView mock2 = Mockito.mock(AnyKeyboardView.class);

    mUnderTest.removeAllViews();

    mUnderTest.addView(mock1);

    Mockito.verify(mock1, Mockito.never())
        .setOnKeyboardActionListener(any(OnKeyboardActionListener.class));

    final OnKeyboardActionListener listener = Mockito.mock(OnKeyboardActionListener.class);

    mUnderTest.setOnKeyboardActionListener(listener);

    Mockito.verify(mock1).setOnKeyboardActionListener(listener);

    mUnderTest.addView(mock2);

    Mockito.verify(mock2).setOnKeyboardActionListener(listener);
  }