fix java Tests
move run and test
memset mutex, error --> debug msg