Add tests for new util2d functionality