Fix unittest.

Signed-off-by: Martin Raspaud <martin.raspaud@smhi.se>
Various fixes.

Signed-off-by: Martin Raspaud <martin.raspaud@smhi.se>