Improve tests structure and test coverage

The test coverage reported was 97%, but it was quite closer to 0 than 100 if you include `@covers` annotations.

I've introduced unit tests to cover all of the functionality (except for the invalid JSON response) and now the test coverage is really 97.3%.

I've also improved the tests structure with better autoloading of helper classes.