Add unit tests to increase sonar coverage