Added test utilities and more tests