unit testing - Mocking Toolkit using JMockit Expectations -


I'm trying to duplicate java.awt.Toolkit.beep () using jmockit expectations. In case of my trial, I have the following code:

  New Expectations () {Toolkit mock; {Mock.bip (); }} .endRecording ();  

When I run test case (Genus 4), I get the following exception on the "New Expectations" row:

  java.lang.ClassFormatError : Code attribute in original or abstraction methods in the class file $ Fake  

Any ideas?

The default jmock can only duplicate the interface to copy the class, you

< / Div>

Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -