Just realized I can't mock final methods. java.nio.ByteBuffer.remaining() declared as final.
from: http://jmock.org/mocking-classes.html
If you want to mock final classes or final methods, the JDave library includes an unfinalizer >Instrumentation agent that can unfinalise classes before they are loaded by the JVM. They can then be >mocked by the ClassImposteriser.