@Test
public void testSetOnTimeCompletionListener()throws IllegalAccessException{

    PauseResumeAudioRecorder pauseResumeAudioRecorder=new PauseResumeAudioRecorder();
    currentAudioStateField.set(pauseResumeAudioRecorder, new AtomicInteger(PauseResumeAudioRecorder.INITIALIZED_STATE));
    final OnMaxTimeCompletionListener onMaxTimeCompletionListener=new OnMaxTimeCompletionListener();
    pauseResumeAudioRecorder.setOnTimeCompletionListener(onMaxTimeCompletionListener);
    Assert.assertEquals("Listener incorrect", onMaxTimeCompletionListener, onTimeCompletionListenerField.get(pauseResumeAudioRecorder));
    pauseResumeAudioRecorder.setOnTimeCompletionListener(null);
    Assert.assertEquals("Listener incorrect null case", null, onTimeCompletionListenerField.get(pauseResumeAudioRecorder));
}