modify bug in test code and add log4j setting for maven test