class QuestionWidget extends RelativeLayout implements Widget {

    public AudioVideoImageTextLabel getAudioVideoImageTextLabel() {
        return audioVideoImageTextLabel;
    }

}

class QuestionWidgetTest {

    @Rule
    public MockitoRule rule;
    @Mock
    public ReferenceManager referenceManager;
    @Mock
    public AudioHelper audioHelper;
    @Mock
    public Analytics analytics;

    @Test
    public void whenQuestionHasAudio_audioButtonUsesIndexAsClipID() throws Exception {

        String reference = createMockReference(referenceManager, "file://blah.mp3");

        FormEntryPrompt prompt = new MockFormEntryPromptBuilder()
                .withIndex("i am index")
                .withAudioURI("file://blah.mp3")
                .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", reference));
    }

}