Fix gulp test should run build task
Add tests for lookupIdentity and registerEndpoint