Added tests and script for testing