Refactor groovy to java

Converts and fixes nginx tests
Passing null rather than exceptionHandler argument.