add TestClassPathResource and modified some code