Client tests

Implement a unit test-suite for the client side code.