refactor tests - move common methods from tests to util classes