Well, looks like PowerMock messes up with SSL issues and thus, you run into loading a wrong factory. The solution for that is to use an annotation on the test class:
@PowerMockIgnore("javax.net.ssl.*")
this is taken from https://groups.google.com/forum/#!topic/powermock/v4nreP2AnOQ