Refactored test to be typesafe and easier to maintain. Added tests. Added description for tests.