add the test coverage for getunit.
fix a bug where NULL was not returned when unit is in the wrong region.