[testHatoholArmPluginGate][DBTablesTest] Unify duplicated code

Move pickupHistory() to DBTablesTest.
And rename it to getTestHistory().