Add tests and fix errors for Rain class