[test] restructor test files
[fix] create errors on demand
[test] require call throws after a connection error