Added Jacoco for test coverage measurements.

Added Jacoco for test coverage and added tests to improve coverage.