@Test public void whenQuestionHasAudio_audioButtonUsesIndexAsClipID() throws Exception { FormEntryPrompt prompt = new MockFormEntryPromptBuilder() .withIndex("i am index") .withAudioURI("ref") .build(); TestScreenContextActivity activity = RobolectricHelpers.createThemedActivity(TestScreenContextActivity.class); TestWidget widget = new TestWidget(activity, new QuestionDetails(prompt, "formAnalyticsID")); AudioButton audioButton = widget.getAudioVideoImageTextLabel().findViewById(R.id.audioButton); verify(audioHelper).setAudio(audioButton, new Clip("i am index", "blah.mp3")); }
public AudioVideoImageTextLabel getAudioVideoImageTextLabel() { return audioVideoImageTextLabel; }
QuestionWidget extends FrameLayout implements Widget { public AudioVideoImageTextLabel getAudioVideoImageTextLabel() { return audioVideoImageTextLabel; } }
QuestionWidget extends FrameLayout implements Widget { public AudioVideoImageTextLabel getAudioVideoImageTextLabel() { return audioVideoImageTextLabel; } QuestionWidget(Context context, QuestionDetails questionDetails);  QuestionWidget(Context context, QuestionDetails questionDetails, boolean registerForContextMenu); }
QuestionWidget extends FrameLayout implements Widget { public AudioVideoImageTextLabel getAudioVideoImageTextLabel() { return audioVideoImageTextLabel; } QuestionWidget(Context context, QuestionDetails questionDetails);  QuestionWidget(Context context, QuestionDetails questionDetails, boolean registerForContextMenu); abstract void setOnLongClickListener(OnLongClickListener l); static boolean isRTL(); TextView getHelpTextView(); FormEntryPrompt getFormEntryPrompt(); QuestionDetails getQuestionDetails(); void recycleDrawables(); void setFocus(Context context); boolean suppressFlingGesture(MotionEvent e1, MotionEvent e2, float velocityX,
                                        float velocityY); Bundle getState(); Bundle getCurrentState(); @Override void cancelLongPress(); void showWarning(String warningBody); @Nullable final String getInstanceFolder(); int getAnswerFontSize(); View getHelpTextLayout(); AudioVideoImageTextLabel getAudioVideoImageTextLabel(); AudioHelper getAudioHelper(); ReferenceManager getReferenceManager(); PermissionUtils getPermissionUtils(); void setPermissionUtils(PermissionUtils permissionUtils); void setValueChangedListener(WidgetValueChangedListener valueChangedListener); void widgetValueChanged(); }
QuestionWidget extends FrameLayout implements Widget { public AudioVideoImageTextLabel getAudioVideoImageTextLabel() { return audioVideoImageTextLabel; } QuestionWidget(Context context, QuestionDetails questionDetails);  QuestionWidget(Context context, QuestionDetails questionDetails, boolean registerForContextMenu); abstract void setOnLongClickListener(OnLongClickListener l); static boolean isRTL(); TextView getHelpTextView(); FormEntryPrompt getFormEntryPrompt(); QuestionDetails getQuestionDetails(); void recycleDrawables(); void setFocus(Context context); boolean suppressFlingGesture(MotionEvent e1, MotionEvent e2, float velocityX,
                                        float velocityY); Bundle getState(); Bundle getCurrentState(); @Override void cancelLongPress(); void showWarning(String warningBody); @Nullable final String getInstanceFolder(); int getAnswerFontSize(); View getHelpTextLayout(); AudioVideoImageTextLabel getAudioVideoImageTextLabel(); AudioHelper getAudioHelper(); ReferenceManager getReferenceManager(); PermissionUtils getPermissionUtils(); void setPermissionUtils(PermissionUtils permissionUtils); void setValueChangedListener(WidgetValueChangedListener valueChangedListener); void widgetValueChanged(); @Inject
    public ReferenceManager referenceManager; @Inject
    public AudioHelperFactory audioHelperFactory; @Inject
    public Analytics analytics; }