[server][DBClientUser] Clean up the test by extracting the commonly used lines.