Re-factor tests and increase coverage as per Coveralls feedback.

Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>