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

    PauseResumeAudioRecorder pauseResumeAudioRecorder=new PauseResumeAudioRecorder();
    currentAudioStateField.set(pauseResumeAudioRecorder, new AtomicInteger(PauseResumeAudioRecorder.RECORDING_STATE));
    pauseResumeAudioRecorder.setAudioEncoding(AudioFormat.ENCODING_PCM_8BIT);
}