Add unit tests. Coverage up to 42.91%.

For ClientRepository and ServiceLocator.