test: Remove repeated codes

By using simnalamburt/bear