added unit tests for client