Added test case

Added test case for getUnits() and added comments.