hapi 6 adjustments and code coverage improvements

Can be rewritten as:

```
if (request.server.info !== undefined && request.server.info.port !== undefined) {
```

or even as:

```
if (request.server.info && request.server.info.port !== undefined) {
```