Error mocking Class which hold reference to SQLiteOpenHelper

前端 未结 3 486
傲寒
傲寒 2021-01-22 23:52

I write unit test for my Presenter, which is need to mock my Local Data Source.

Here is my simple test :

public class AddressPresenterTest {
           


        
3条回答
  •  北恋
    北恋 (楼主)
    2021-01-23 00:35

    In my case, in my project using javassist-3.11.0.GA.jar. After google some papers talk about the issue above related to javassist verison so I try to upgrade javassist to javassist-3.18.2-GA.jar or javassist-3.21.0-GA.jar the issue is resolved.

    Some others issues can resolve by this way as below:

    java.lang.VerifyError: Inconsistent stackmap frames at branch target 40 Exception

    ,

    java.lang.RuntimeException: java.io.IOException: invalid constant type: 18

    ,

    Underlying exception : java.lang.IllegalArgumentException: Could not create type

    Regards,

提交回复
热议问题