GWTII-253: fix unit test and npe