@Test(expected=IllegalStateException.class)
public void testSetMaxTimeInMillisBadState()throws IllegalAccessException{

    PauseResumeAudioRecorder pauseResumeAudioRecorder=new PauseResumeAudioRecorder();
    currentAudioStateField.set(pauseResumeAudioRecorder, new AtomicInteger(PauseResumeAudioRecorder.RECORDING_STATE));
    pauseResumeAudioRecorder.setMaxTimeInMillis(1000);
}