Added tests and test utilities