#5849 clean up & junit test