Added unit test for rect.