Adding static-only switch to pickling

Let's move those to `src/test/scala`, since they're test-only.