Write instead as
```
assertNotNull(resource, "...")
assertEquals(...)
```
?