Unit test the HAR converter and rewrite in fonctionnal style for easier testing