Unittest for ranges