added a test to make sure it accepts a hashref and a hash for params to ->new