updated tests for db
@beforeClass and @afterClass supported in tests #978