added license header

Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
few cleanups in CertServiceTest and CertService

Tests:
- all tests are @Test rather than having one test to call them, so they can be run one by one
- tests that expect exception from a method fail if there is none
- no longer extends TestCase so that the original method names could be kept as test

Implementation:
- include root cause in exceptions when possible - helps at troubleshuting
- close readers

Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>