Make tests independent to factories

Remove `let` variables and set testing attributes explicitly.