DRY out test file and fix style.