Unit tests for client