Add tests for shapes abstraction. Fixes #21.