add unit tests and fix up test for checkIF2dArrayHasEmptyElements method