private void assertDoesNotAllowWrongTypeException(TestInterface testObject) throws IOException { Recorder<TestInterface> recorder = TestObject.createRecorder(testObject); testObject.throwDeclardeException(); recorder.recordForLastCall().andThrow(new Exception()); }