I\'m having some trouble with the PrepareForTest annotation and creating a new instance of an AmazonSQSClient.
I\'m writing a Jenkins plugin and unfortunately need t
Try to add @PowerMockIgnore("org.apache.http.conn.ssl.*")
annotation to your class
As @Natalie already mentioned, you can work with the @PowerMockIgnore()
annotation. Maybe you need to ignore the packages javax.net.ssl.*
and / or javax.crypto.*
:
@PowerMockIgnore({"org.apache.http.conn.ssl.*", "javax.net.ssl.*" , "javax.crypto.*"})
You can get here some background information:
https://groups.google.com/forum/#!topic/powermock/v4nreP2AnOQ
This is most likely because SSLContext is loaded by the bootstrap classloader and PowerMock cannot byte-code manipulate these classes. You have to use this approach to mock that method. /Johan Haleby