@Test
public void testSetOnFileSizeReachedListener()throws IllegalAccessException{

    PauseResumeAudioRecorder pauseResumeAudioRecorder=new PauseResumeAudioRecorder();
    currentAudioStateField.set(pauseResumeAudioRecorder, new AtomicInteger(PauseResumeAudioRecorder.INITIALIZED_STATE));
    final OnMaxFileSizeReachedListener onMaxFileSizeReachedListener=new OnMaxFileSizeReachedListener();
    pauseResumeAudioRecorder.setOnFileSizeReachedListener(onMaxFileSizeReachedListener);
    Assert.assertEquals("Listener incorrect", onMaxFileSizeReachedListener, onFileSizeReachedListenerField.get(pauseResumeAudioRecorder));
    pauseResumeAudioRecorder.setOnFileSizeReachedListener(null);
    Assert.assertEquals("Listener incorrect null case", null, onFileSizeReachedListenerField.get(pauseResumeAudioRecorder));
}