fix npe
fix NPE
mock test classes