Refactor HashFromBlock tests