Fixed before/after in unittests and added fillDB function