### Question:
ClassFileSequencer implements StreamSequencer { public void setClassFileRecorderClassName( String classFileRecorderClassName ) throws ClassNotFoundException, IllegalAccessException, InstantiationException { if (classFileRecorderClassName == null) { this.classFileRecorder = DEFAULT_CLASS_FILE_RECORDER; return; } Class<?> classFileRecorderClass = Class.forName(classFileRecorderClassName); this.classFileRecorder = (ClassFileRecorder)classFileRecorderClass.newInstance(); }  void sequence( InputStream stream,
                          SequencerOutput output,
                          StreamSequencerContext context ); void setClassFileRecorderClassName( String classFileRecorderClassName ); void setClassFileRecorder( ClassFileRecorder classFileRecorder );  }### Answer:
@Test( expected = ClassCastException.class ) public void shouldNotAllowSettingClassFileRecorderToInvalidClass() throws Exception { sequencer.setClassFileRecorderClassName(Object.class.getName()); }