fixes #5130 fixed junit test and final response improvement