Updated test framework and added tests

Fixed.