updates to test cases - moved over and updated copy of tesdb routines