I am writing unit tests for my spark application. I used powermockito to test a transformation. When I run the junit test I got error like,
2016-03-24 17:10:10:805 INFO - Running Spark version 1.6.0
2016-03-24 17:10:11:479 WARN - Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
2016-03-24 17:10:11:586 ERROR - Can't find user in Subject:
Principal: NTUserPrincipal: My_userNAME
Principal: NTSidUserPrincipal: S-1-5-21-1082354718-1040695487-3441060932-16865
Principal: NTDomainPrincipal: MY_DOMAIN
.............
...........
Public Credential: NTNumericCredential: 1872
When I remove the udage of powermockito the above error is gone. I don't know why powermockito is not working on spark rdd transformation.