A test code review for QueryServiceEJB

This is the original commit as it was made last week.  Let's start from the beginning...