Unit testing the Spin.spin() method

To demonstrate unit tests, might be helpful for further development. Had to separate the generation of the random spins array from the Spin class. This is a frequent consequence of writing unit tests. One has to refactor the source code under test to facilitate testing, which makes the original code cleaner, more reusable and less coupled.