### Question:
PlaybackBannerControlGlue extends PlaybackBaseControlGlue<T> { @Override public void setControlsRow(PlaybackControlsRow controlsRow) { super.setControlsRow(controlsRow); onUpdatePlaybackState(); } PlaybackBannerControlGlue(Context context,
            int[] seekSpeeds,
            T impl);  PlaybackBannerControlGlue(Context context,
                                    int[] fastForwardSpeeds,
                                    int[] rewindSpeeds,
                                    T impl); @Override void setControlsRow(PlaybackControlsRow controlsRow); @Override void onActionClicked(Action action); @Override boolean onKey(View v, int keyCode, KeyEvent event); @NonNull int[] getFastForwardSpeeds(); @NonNull int[] getRewindSpeeds(); @Override long getCurrentPosition(); @Override void play(); @Override void pause(); static final int ACTION_CUSTOM_LEFT_FIRST; static final int ACTION_SKIP_TO_PREVIOUS; static final int ACTION_REWIND; static final int ACTION_PLAY_PAUSE; static final int ACTION_FAST_FORWARD; static final int ACTION_SKIP_TO_NEXT; static final int ACTION_CUSTOM_RIGHT_FIRST; static final int PLAYBACK_SPEED_INVALID; static final int PLAYBACK_SPEED_PAUSED; static final int PLAYBACK_SPEED_NORMAL; static final int PLAYBACK_SPEED_FAST_L0; static final int PLAYBACK_SPEED_FAST_L1; static final int PLAYBACK_SPEED_FAST_L2; static final int PLAYBACK_SPEED_FAST_L3; static final int PLAYBACK_SPEED_FAST_L4; }### Answer:
@Test public void customControlsRow() { mContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); InstrumentationRegistry.getInstrumentation().runOnMainSync(new Runnable() { @Override public void run() { mGlue = new PlaybackBannerControlGlueImpl(mContext); } }); PlaybackControlsRow row = new PlaybackControlsRow(mContext); mGlue.setControlsRow(row); PlaybackGlueHostImpl host = new PlaybackGlueHostImpl(); mGlue.setHost(host); assertSame(mGlue, host.mGlue); assertSame(host, mGlue.getHost()); assertTrue(host.mPlaybackRowPresenter instanceof PlaybackControlsRowPresenter); assertSame(host.mRow, row); }
@Test public void customRowAndPresenter() { mContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); InstrumentationRegistry.getInstrumentation().runOnMainSync(new Runnable() { @Override public void run() { mGlue = new PlaybackBannerControlGlueImpl(mContext); } }); PlaybackControlsRow row = new PlaybackControlsRow(mContext); mGlue.setControlsRow(row); PlaybackRowPresenter presenter = new PlaybackRowPresenter() { @Override protected RowPresenter.ViewHolder createRowViewHolder(ViewGroup parent) { return new RowPresenter.ViewHolder(new LinearLayout(parent.getContext())); } }; mGlue.setPlaybackRowPresenter(presenter); PlaybackGlueHostImpl host = new PlaybackGlueHostImpl(); mGlue.setHost(host); assertSame(mGlue, host.mGlue); assertSame(host, mGlue.getHost()); assertSame(host.mPlaybackRowPresenter, presenter); assertSame(host.mRow, row); }