refactor test

	extract function from common assertions