scala exercises and test code