Improves tests

o adds check for api version
o adds option to set competible api version