class PauseResumeAudioRecorder {

    public void setSampleRate(final int sampleRateInHertz){
        if (sampleRateInHertz!=DEFAULT_AUDIO_SAMPLE_RATE_HERTZ && sampleRateInHertz !=22050
                && sampleRateInHertz != 16000 && sampleRateInHertz !=11025){
            throw new IllegalArgumentException("Invalid sample rate given");
        }
        else if (currentAudioState.get()!=PREPARED_STATE && currentAudioState.get()!=INITIALIZED_STATE ){
            throw new IllegalStateException("Recorder cannot have its sample rate changed when it is not in an initialized or prepared state");
        }
        this.sampleRateInHertz=sampleRateInHertz;
    }

}

class PauseResumeAudioRecorderTest {

    public void testSetSampleRateBadInput(){pauseResumeAudioRecorder.setSampleRate(0);private PauseResumeAudioRecorder pauseResumeAudioRecorder;
    public void testSetSampleRateBadInput(){pauseResumeAudioRecorder.setSampleRate(0);private boolean failTest;
    public void testSetSampleRateBadInput(){pauseResumeAudioRecorder.setSampleRate(0);private Field sampleRateInHertzField;
    public void testSetSampleRateBadInput(){pauseResumeAudioRecorder.setSampleRate(0);private Field channelConfigField;
    public void testSetSampleRateBadInput(){pauseResumeAudioRecorder.setSampleRate(0);private Field audioEncodingField;
    public void testSetSampleRateBadInput(){pauseResumeAudioRecorder.setSampleRate(0);private Field audioFileField;
    public void testSetSampleRateBadInput(){pauseResumeAudioRecorder.setSampleRate(0);private Field currentAudioStateField;
    public void testSetSampleRateBadInput(){pauseResumeAudioRecorder.setSampleRate(0);private Field currentAudioRecordingThreadField;
    public void testSetSampleRateBadInput(){pauseResumeAudioRecorder.setSampleRate(0);private Field recordingStartTimeMillisField;
    public void testSetSampleRateBadInput(){pauseResumeAudioRecorder.setSampleRate(0);private Field remainingMaxTimeInMillisField;
    public void testSetSampleRateBadInput(){pauseResumeAudioRecorder.setSampleRate(0);private Field onTimeCompletedTimerField;
    public void testSetSampleRateBadInput(){pauseResumeAudioRecorder.setSampleRate(0);private Field onTimeCompletionTimerTaskField;
    public void testSetSampleRateBadInput(){pauseResumeAudioRecorder.setSampleRate(0);private Field onTimeCompletionListenerField;
    public void testSetSampleRateBadInput(){pauseResumeAudioRecorder.setSampleRate(0);private Field maxTimeInMillisField;
    public void testSetSampleRateBadInput(){pauseResumeAudioRecorder.setSampleRate(0);private Field onFileSizeReachedListenerField;
    public void testSetSampleRateBadInput(){pauseResumeAudioRecorder.setSampleRate(0);private Field maxFileSizeInBytesField;
    public void testSetSampleRateBadInput(){pauseResumeAudioRecorder.setSampleRate(0);private Field audioRecordThreadField;
    public void testSetSampleRateBadInput(){pauseResumeAudioRecorder.setSampleRate(0);@Mock
    private Timer mockTimer;

    public void testSetSampleRateBadInput(){pauseResumeAudioRecorder.setSampleRate(0);@Test(expected = IllegalArgumentException.class)

    public void testSetSampleRateBadInput(){pauseResumeAudioRecorder.setSampleRate(0);}

}