added unit tests to hub close #4