Added unittesting and now validates arguments passed in are the correct classes