Added test for hosts enum
hook works if a .jar-export is run from cli beforehand
fixed equals and hashcode to comply with tests
refactored hosts implementation