Updated test framework and added tests

Done.