org.powermock.reflect.exceptions.MethodNotFoundException: No method found with name ‘myMethod’ with parameter types: [ [B, org.mainco.subco.user.domain.UserFile, org.mainco.subco.user.domain.User ] in class org.mainco.subco.user.service.MyService.

Google Groups | Unknown author | 2 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Mocking a private method with a service interface and its implementing class

    Google Groups | 2 years ago | Unknown author
    org.powermock.reflect.exceptions.MethodNotFoundException: No method found with name ‘myMethod’ with parameter types: [ [B, org.mainco.subco.user.domain.UserFile, org.mainco.subco.user.domain.User ] in class org.mainco.subco.user.service.MyService.

    Root Cause Analysis

    1. org.powermock.reflect.exceptions.MethodNotFoundException

      No method found with name ‘myMethod’ with parameter types: [ [B, org.mainco.subco.user.domain.UserFile, org.mainco.subco.user.domain.User ] in class org.mainco.subco.user.service.MyService.

      at org.powermock.reflect.internal.WhiteboxImpl.throwExceptionIfMethodWasNotFound()
    2. powermock-reflect
      WhiteboxImpl.throwExceptionIfMethodWasNotFound
      1. org.powermock.reflect.internal.WhiteboxImpl.throwExceptionIfMethodWasNotFound(WhiteboxImpl.java:1167)
      1 frame
    3. powermock-api-support
      MemberMatcher.method
      1. org.powermock.api.support.membermodification.MemberMatcher.method(MemberMatcher.java:82)
      1 frame
    4. org.mainco.subco
      MyServiceIT.setup
      1. org.mainco.subco.user.service.MyServiceIT.setup(MyServiceIT.java:52)
      1 frame