Tests

Based on the `badges` branch. Adds tests to deliver 100% coverage on the current library code.