Junit Test and Bug correction