added messages junit test and fixed userprofile junit test