implementing database test code.